sessionWithConfiguration freezing iOS 8 iPhone 4S

2019-06-04 02:48发布

I am experiencing a disturbing issue when trying to execute one of my apps on an iPhone 4S with iOS8 and Xcode 6.0.1. What happens is that the control seems to freeze in the last instruction of the block:

dispatch_once(&onceToken, ^{
    NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:@"myBackgroundSessionIdentifier"];
    NSLog(@"configuration=%@", configuration);
    configuration.allowsCellularAccess = YES;
    configuration.timeoutIntervalForRequest = 30.0;
    configuration.timeoutIntervalForResource = 60.0;
    configuration.HTTPMaximumConnectionsPerHost = 1;
    session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:[NSOperationQueue
                                                                                                mainQueue]];
});

Please note that neither the iPad I tested nor the simulator have any issues about it. Also the same app on the store, compiled with the past Xcode, seems to have no issue on any device, both according to my tests and on the lack of users feedbacks. I could not test it on my iPhone 4 as I seem unable to install the app on it from the new Xcode: it complaints the iPhone is busy when I try to install it.

Has anyone had a similar problem and knows how to fix it?

1条回答
欢心
2楼-- · 2019-06-04 03:22

Wipe the device and restore from backup.

查看更多
登录 后发表回答