Post

Replies

Boosts

Views

Activity

Swift 6 crash calling requestAutomaticPassPresentationSuppression
I found a similar problem here https://developer.apple.com/forums/thread/764777 and I could solve my problem by wrapping the call to requestAutomaticPassPresentationSuppression in a call to DispatchQueue.global().async. But my question is if this is really how things should work. Even with strict concurrency warnings in Swift 6 I don't get any warnings. Just a runtime crash. How are we supposed to find these problems? Couldn't the compiler assist with a warning/error. Why does the compiler make the assumptions it does about the method that is declared like this: @available(iOS 9.0, *) open class func requestAutomaticPassPresentationSuppression(responseHandler: @escaping (PKAutomaticPassPresentationSuppressionResult) -> Void) -> PKSuppressionRequestToken Now that we have migrated to Swift 6 our code base contains a bunch of unknown places where it will crash as above.
2
0
240
1w