sessionWithConfiguration在新Xcode 6.0.1上冻结iOS 8 iPhone 4S [英] sessionWithConfiguration freezing iOS 8 iPhone 4S on new Xcode 6.0.1

查看:106
本文介绍了sessionWithConfiguration在新Xcode 6.0.1上冻结iOS 8 iPhone 4S的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用iOS8和Xcode 6.0.1在iPhone 4S上执行我的某个应用程序时遇到了一个令人不安的问题。结果是控件似乎在块的最后一条指令中冻结:

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]];
});

请注意,我测试的iPad和模拟器都没有任何问题。
此外,使用过去的Xcode编译的商店中的相同应用程序似乎在任何设备上都没有问题,根据我的测试和缺乏用户反馈。
我无法在我的iPhone 4上测试它,因为我似乎无法从新的Xcode上安装应用程序:当我尝试安装它时,它抱怨iPhone正忙。

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?

推荐答案

擦除设备并从中恢复备份。

Wipe the device and restore from backup.

这篇关于sessionWithConfiguration在新Xcode 6.0.1上冻结iOS 8 iPhone 4S的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆