PopupView is not available in the newly created Xcode 16 version.
PopupView is not available in the newly created Xcode 16 version.
Hey! Thanks for this comment. I'm going to include it in #142 patch, that will be released (hopefully) this week (sorry, I've been working on it for three weeks so far and still haven't finished).
Have a nice day, Tomasz
@FulcrumOne Hey thank you, any idea how long its going to take? our project will be released in 2 weeks and it's heavily relying on this library
Hey,
I'm publishing release candidate version on 16 October. Sorry it takes so much time, but the update is really huge (and unfortunately has some changes to public API, as I wanted to simplify it as much as possible).
P.S. I think the pretty stabile version should be ready in couple of days. I'll let you know when I finish changing public API, so you can start updating your codebase earlier.
@obaida-mostarihi @aahspringaa4 Hello I've just tested this library with the newest Xcode 16.1 beta.
I've created fresh project, imported library and i didn't have any problems with using it.
Works well both with simulator and real iPhone 16.
Had no problems during creating archive and validating it.
The only problem that i faced with - is that i had to add the library into the "Frameworks, Libraries and Embedded Content" section manually.
If it won't work, please provide more information about your problem.
@jay-jay-lama The issue i'm facing now is they are not interactive at all, when it pops up i can't dismiss it, and i can't even interact with the views inside the popup, it was working fine before updating XCode, after updating XCode every popup just stops working when it shows
@obaida-mostarihi I've tested it with bottom pop-up and had no troubles. (Ordinary bottom pop-up, buttons and Text) Could you provide a code for such pop-up that it not interactive?
Here's my BottomPopup code, it's really basic. Note: i'm using Stinsen for navigation, i'm not sure if it could be the problem, but it was working fine before
import SwiftUI
import MijickPopupView
import Stylesguide
// MARK: - Parent
public extension PatientUI.ConsultationMaker.Popups {
struct Selection: BottomPopup {
public enum SelectionType {
case forMe
case forSomeoneElse
}
let selection: (SelectionType) -> ()
public func createContent() -> some View {
BottomSheetLayout {
VStack(spacing: 16) {
Button {
selection(.forMe)
dismiss()
} label: {
selectionView(
image: Images.personWithHeartIcon.swiftUIImage,
title: Strings.ConsultationCreation.Selection.ForMe.title,
subtitle: Strings.ConsultationCreation.Selection.ForMe.subtitle
)
}
Button {
selection(.forSomeoneElse)
dismiss()
} label: {
selectionView(
image: Images.handHoldingHeartIcon.swiftUIImage,
title: Strings.ConsultationCreation.Selection.ForSomeoneElse.title,
subtitle: Strings.ConsultationCreation.Selection.ForSomeoneElse.subtitle
)
}
}
}
}
}
}
// MARK: - Views
extension PatientUI.ConsultationMaker.Popups.Selection {
private func selectionView(
image: Image,
title: String,
subtitle: String
) -> some View {
VStack(alignment: .leading, spacing: 10) {
image
.resizable()
.scaledToFit()
.frame(width: 16, height: 16)
Text(title)
.bodyStyle(.contentAccent)
Text(subtitle)
.bodyStyle(.footnoteRegular)
.lineSpacing(6)
.multilineTextAlignment(.leading)
}
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
.foregroundStyle(Colors.Neutrals.onSurface.swiftUIColor)
.padding(.vertical)
.padding(.horizontal, Paddings.defaultPadding)
.background {
RoundedRectangle(cornerRadius: 20, style: .continuous)
.foregroundStyle(Colors.Neutrals.surface.swiftUIColor)
}
.padding(.horizontal, Paddings.defaultPadding)
}
}
#Preview {
PatientUI.ConsultationMaker.Popups.Selection(selection: {_ in})
}
Usage:
PatientUI.ConsultationMaker.Popups.Selection(selection: { selection in self.rootRouter?.route(to: \.createConsultation, selection) }).showAndReplace()
@obaida-mostarihi,
I've just discovered this problem; let me confirm, you're using this second option to initialize the framework, with UISceneConfiguration, don't you?
@FulcrumOne Yes i think so, you mean here no?
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
let sceneConfig = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
sceneConfig.delegateClass = CustomPopupSceneDelegate.self
FirebaseApp.configure()
return sceneConfig
}
}
@FulcrumOne You're right! after removing it now and used .implementPopupView() it works fine now
@obaida-mostarihi Yeah, but it should work with that initialization anyway. I found this bug when refactoring the last public API class (exactly this one 😅).
I'll try to fix it and let you know when I've finished.
@obaida-mostarihi
I've found the source of the problem - it seems that in iOS 18 Apple has broken hit testing. Looking for a workaround now.
EDIT: Fixed in patch-3.0.0 branch