Post

Replies

Boosts

Views

Activity

Reply to What to do with a visionOS (designed for iPad) app in App Store Connect?
You can add a visionOS Platform in App Store Connect. But then if you want to submit for that platform, you'd have to submit a visionOS binary, not one for 'visionOS (designed for iPad)'. To do that, go to your build settings and under Architectures, set Base SDK to 'visionOS'. Then you will see the Destination 'Any visionOS Device (arm64)' in Xcode. If you keep the Base SDK as 'iOS' and submit a binary, it will be sent to your iOS app Platform. It won't be seen by a visionOS Platform.
Jan ’24
Reply to Main actor-isolated instance method 'locationManagerDidChangeAuthorization' cannot be used to satisfy nonisolated protocol requirement
@DTS Engineer, here's an example of what I did. nonisolated func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { Task { await changeMyLocation(locations) } } func changeMyLocation(_ locations: [CLLocation]) { myLocation = locations.last } I created a function to change the location and called it via a task.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’24
Reply to Swift 6, SwiftData modelContext.save() Crashes, Does not AutoSave
I've discovered where the crash is occurring. I have an @objc function called updateView() that is fired when the view controller detects NSPersistenStoreRemoteChange. As soon as I save an object in another view, the update fires and the app crashes. NotificationCenter.default.addObserver(self, selector: #selector(updateView(_ :)), name: .NSPersistentStoreRemoteChange, object: nil) The crash does not occur using Swift 5.
Aug ’24