OSDN Git Service

Bug fixes for problems introduced with last commit.
[syncr/master.git] / CocoaAsyncSocket / CocoaAsyncSocket-6.1.1 / GCD / Xcode / IPhoneConnectTest / Classes / IPhoneConnectTestAppDelegate.m
@@ -68,6 +68,11 @@ static const int ddLogLevel = LOG_LEVEL_INFO;
        
        if (port == 443)
        {
+               
+       #if !TARGET_IPHONE_SIMULATOR
+               
+               // Backgrounding doesn't seem to be supported on the simulator yet
+               
                [sock performBlock:^{
                        if ([sock enableBackgroundingOnSocketWithCaveat])
                                DDLogInfo(@"Enabled backgrounding on socket");
@@ -75,6 +80,8 @@ static const int ddLogLevel = LOG_LEVEL_INFO;
                                DDLogWarn(@"Enabling backgrounding failed!");
                }];
                
+       #endif
+               
                // Configure SSL/TLS settings
                NSMutableDictionary *settings = [NSMutableDictionary dictionaryWithCapacity:3];