Reputation: 21
I have imported CallKit framework as optional only. But import CallKit crashes while running on iOS 9 at launch. But works perfectly on iOS 10. It worked fine in XCode 8 beta 6 but this issue is happening only on XCode 8. The code is in Swift 3.
Any help is much appreciated.
Upvotes: 0
Views: 851
Reputation: 136
There is/was a bug in Swift 3 language that wrongly links module libraries github pull request, that is fixed now, but the fix is not yet implemented in XCode, not even in beta.
You could get latest swift toolchain build from link and install it to XCode to try and see the fix, but the app would not be approved for Appstore as it's stated here
You got two solutions;
If you choose to revert back to swift 2, brace yourself with a lot of patience :D
Upvotes: 1
Reputation: 12844
CallKit API is only for iOS 10.0+. It won't work for iOS 9.0. Use a condition for iOS version 9.0 and 10.0 to avoid the crash.
Reference : https://developer.apple.com/reference/callkit?language=objc
Upvotes: 1