Hi Dan, As far as I know, if __IPHONE_4_0 is defined, it means that you're using iOS4 SDK or later and I just check in iOS 5 SDK, the definition is still there in Availability.h. Please let me know if I misunderstand something or if some of the iOS BG feature doesn't work this way. Best regards, Ming On Tue, Oct 18, 2011 at 11:08 AM, Dan Nolan <dan.james.nolan at gmail.com> wrote: > I think there may be an issue with the creation of the backgrounding socket > in the current SVN trunk and previous builds. I've reviewed the document on > the wiki in regards to issues with backgrounding sockets on iOS devices and > I think the existing flag code > #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 > # ? ?include "TargetConditionals.h" > # ? ?if TARGET_OS_IPHONE > # include "Availability.h" > /* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */ > # define PJ_GETADDRINFO_USE_CFHOST 1 > /* Disable local host resolution in pj_gethostip() (see ticket #1342) */ > # define PJ_GETHOSTIP_DISABLE_LOCAL_RESOLUTION 1 > # ? ? ifdef __IPHONE_4_0 > ? ? ?/* Is multitasking support available? ?(see ticket #1107) */ > # ? ?define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1 > ? ?/* Enable activesock TCP background mode support */ > # ? ?define PJ_ACTIVESOCK_TCP_IPHONE_OS_BG 1 > # endif > # ? ?endif > #endif > Doesn't define for iOS4+ currently. I may be completely wrong but the code > that will compile and create a socket under iOS4 and will work in the > background is not fired if compiling with the iOS5 SDK and thus > backgrounding sockets aren't working. I've the UIBackgroundModes setup, I'm > using a TCP transport but the logging does not display 'tcp transport > configured for voip' under iOS5. > You could equally do the define as #IFDEF __IPHONE_OS_VERSION_MIN_REQUIRED > 40000 and that should work for iOS5 if you set the min variable in your > user.mak or your config_site.h > It's either that or that CFReadStreamRef for backgrounding has changed under > iOS5. I know the watchdog is now a lot less lenient on background processes > under iOS5 but will continue to test and work with this codebase and if I > have any luck I'll submit a patch. > Any advice would be really appreciated. > Regards, > Dan Nolan > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >