Post

Replies

Boosts

Views

Activity

Dyld Symbol not found on Local Swift Package
I work on iOS App project in workspace. I splitted feature in a Local Swift Package. Workspace contains both iOS App Project and Swift Package. https://i.stack.imgur.com/LhL5j.jpg Swift package platform is iOS 14 and deployment target of project is iOS 13. I put optional link on my Swift Package to avoid crash on iOS 13 https://i.stack.imgur.com/Y1HYb.png Application run well on iOS 14 but still crash on iOS 13 : dyld: Symbol not found: _$s7SwiftUI4ViewP14_viewListCount6inputsSiSgAA01_ceF6InputsV_tFZTq Just for example, I would like to use Swift Package like this : Swift #if canImport(Classifier) @available(iOS 14.0, *) struct ActionClassifier: View { var body: some View { Text("Hello, World!") } } #endif Did I miss something on the way of link my Swift Package Binary to my project ?
1
0
1.3k
Apr ’21
Fix SwiftUI environnementObject error crash on released app
My app on AppStore got two crashes that look very similar. This crash seems to append when I call function that use a environnement object SubscriptionManager. By analysing the error stack I think It happens in the function safeAddExercice() when I try to get self.subscriptionManager that is the environnement object. These are errors stacks : Crash1 - https://developer.apple.com/forums/content/attachment/47ab2bc3-fee7-4c69-a5a0-0fcf30cf2c36 Crash2 - https://developer.apple.com/forums/content/attachment/7ed9987f-45cf-4a03-8849-ad9b01e6644f That is the function safeAddExercice() : private func safeAddExercice() { if Exercice.canAddNew(for: self.subscriptionManager) { self.showExerciceAdd = true }else{ self.showMember = true } } It's a function of ExerciceList : struct ExerciceList: View { //some other environnement objects... @EnvironmentObject var subscriptionManager: SubscriptionManager ... } ExerciceList is an item of TabBar : struct MainApp: View { //some other envObjects... @EnvironmentObject var subscriptionManager: SubscriptionManager ... var body: some View { UIKitTabView{ ExerciceList(selection: .constant(nil)) .environment(\.managedObjectContext, managedObjectContext) .environmentObject(userSettings) .environmentObject(subscriptionManager) .tab(title: NSLocalizedString("My exercises", comment: ""), image: "dumbell") ...} } SubscriptionManager is instantiated in AppDelegate : var subscriptionManager: SubscriptionManager = { 				SubscriptionManager() 		}() And pass to `MainApp` in `SceneDelegate`: let subscriptionManager = (UIApplication.shared.delegate as! AppDelegate).subscriptionManager let contentView = MainApp().environment(\.managedObjectContext, context) .environmentObject(subscriptionManager) ... Crash appends both on iOS 13 and 14. I try to find a moment where I missed to inject object but I'm struggling a bit to find something.
2
0
2.5k
Feb ’21
NavigationBar Item doesn't appear anymore after screen rotation SwiftUI iOS 14
I have a simple pattern : a list view with a detail view. Both have navigation bar item. Problem: Only on the detail view when I rotate the screen to landscape, the navigation bar item disappears and will never appear anymore even If I rotate back. This bug occurs only on iOS14. ListView : NavigationView{ 		ZStack{ (List and NavigationLink...) }.navigationBarItems(trailing: Button(...)) .sheet(someSheet...) }.navigationViewStyle(StackNavigationViewStyle()) DetailView : 		ZStack { 				(someView...) 				.navigationBarTitle(...) 				.navigationBarItems(trailing: Button(...)) 				.sheet(someSheet...) 		}
2
0
911
Oct ’20