Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 16 crash #419

Open
akkrat opened this issue Sep 5, 2022 · 2 comments
Open

iOS 16 crash #419

akkrat opened this issue Sep 5, 2022 · 2 comments

Comments

@akkrat
Copy link
Contributor

akkrat commented Sep 5, 2022

CFStreamCreatePairWithSocketToHost has been deprecated in iOS 16. When using it app crashes with message "Linked against modern SDK, VOIP socket will not wake. Use Local Push Connectivity instead". But voip is disabled with mailstream_cfstream_voip_enabled by default

Screenshot 2022-09-05 at 12 45 30

Disabling CFStream with mailstream_cfstream_enabled = 0 doesn't work (Tested on custom mailcore2 build)

Xcode: Version 14.0 beta 6 (14A5294g)

@dsanghan
Copy link

A workaround is just adding #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_16 in mailstream_low_cfstream_open_voip_timeout - MCIMAPSession & MCIMAPAsyncSession use mVoIPEnabled = true; by default in the initializers.

#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_16
#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR  
  if (voip_enabled) {
    CFReadStreamSetProperty(readStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP);
    CFWriteStreamSetProperty(writeStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP);
  }
#endif
#endif

@rjvishnu87
Copy link

This crash is because of the kCFStreamNetworkServiceTypeVoIP is deprecated. We need to avoid using kCFStreamNetworkServiceTypeVoIP.

https://developer.apple.com/forums/thread/49363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants