iOS8后台获取问题 [英] iOS8 background fetch issue
问题描述
我已经在ios8之前的版本中使用了后台抓取功能,没有任何问题.但是在ios8中,当我在手机上模拟后台获取时,我首先收到一个错误,提示我没有播放声音的权限,因此我没有收到任何本地通知.然后在打开应用程序时,应用程序崩溃了,我得到了这个奇怪的错误:
I have used background fetch in pre ios8 without a problem. But in ios8 when i simulate background fetch on my phone i first get an error that i do not have permission to play sound therefore i do not get any local notifications. Then upon opening the app, the app crashes and i get this wierd error:
由于未捕获的异常而终止应用程序 "NSInternalInconsistencyException",原因:此请求已被 绝望的-您不能调用-sendResponse:两次,也不能在对其进行编码之后
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'this request has been neutered - you can't call -sendResponse: twice nor after encoding it'
推荐答案
与此相关 iOS 8 NSInternalInconsistencyException
查找从以下方法获得的调用完成处理程序的地方:
Look for places where you call completion handlers you get from methods like this:
- (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
这篇关于iOS8后台获取问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!