for PushKit integration on iOS, one should set PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT to 0 in order to get rid of the deprecation warning for kCFStreamNetworkServiceTypeVoIP.
https://trac.pjsip.org/repos/ticket/1941
https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone#bg-call
In sock_bsd.c around line 558 the same precompiler option also influences the socket option to disable SIGPIPE.
Apples documentation states, that one should handle or disable SIPIPE for *all* POSIX sockets on iOS:
https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/CommonPitfalls/CommonPitfalls.html
I am testing with PushKit/CallKit and plain old SIP UDP and therefore have set PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT to 0 according to the PJSIP documentation.
But I am seeing SIGPIPE crashes with iOS 11.2, when bringing the app from the suspended state into the foreground.
Now I have set PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT back to 1 (and left PJ_ACTIVESOCK_TCP_IPHONE_OS_BG set to 0), in order to let pjlib set SO_NOSIGPIPE on the sockets.
The crashes are gone, PushKit still works fine with SIP over UDP. All is good. Well, the deprecation warning for kCFStreamNetworkServiceTypeVoIP is back, and I am acting against the PJSIP documentation. ;)
So I am wondering, what the correct setting for PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT in a current iOS/PushKit/PJSIP szenario is?
Should that precompiler option really influence the setting of SO_NOSIGPIPE? Or should SO_NOSIGPIPE be independent of the MULTITASKING option, and rather be OS dependent? Am I missing something?
Thanks,
Sebastian.
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org