MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

linked against modern SDK, VOIP socket will not wake error. #1955

Closed guidedways closed 1 year ago

guidedways commented 1 year ago

When I run an iOS 16 app linked with MailCore, I see this:

libsp.dylib`spd_checkin_socket.cold.1:
    0x1f8628364 <+0>:  adrp   x8, 144849
    0x1f8628368 <+4>:  adrp   x9, 0
    0x1f862836c <+8>:  add    x9, x9, #0xa3f            ; "Linked against modern SDK, VOIP socket will not wake. Use Local Push Connectivity instead"
    0x1f8628370 <+12>: str    x9, [x8, #0x400]
->  0x1f8628374 <+16>: brk    #0x1

Thread 20: EXC_BREAKPOINT (code=1, subcode=0x1f8628374

This isn't happening on earlier iOS versions.

guidedways commented 1 year ago

It seems to be due to this line when ConnectionTypeTLS is set as the connection type (in MCIMAPSession.cpp):

        case ConnectionTypeTLS:
        r = mailimap_ssl_connect_voip(mImap, MCUTF8(mHostname), mPort, isVoIPEnabled());
guidedways commented 1 year ago

Seems like mVoIPEnabled is set to true by default, needs to be turned off when creating a new session on iOS 16.

ruansunkel commented 1 year ago

Hi, thank you for this, I got this error as well on iOS 16. What worked for me was the following:

MCOIMAPSession *imapSession = [[MCOIMAPSession alloc] init];
imapSession.voIPEnabled = false;
VishnuPrem55 commented 1 year ago

Thanks for Saving my time, I got this error as well on iOS 16 and Xcode 14.0. For Swift latest version, use below this

 var session = MCOIMAPSession()
 session.isVoIPEnabled = false
rokas-ambrazevicius commented 1 year ago
var session = MCOIMAPSession()
session.isVoIPEnabled = false

Works on Xcode 14 and iOS 16 👍