Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS8 background fetch issue

Tags:

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:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'this request has been neutered - you can't call -sendResponse: twice nor after encoding it'

like image 555
milad sh Avatar asked Sep 29 '22 19:09

milad sh


1 Answers

It is related to this 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
like image 145
Christian Schuster Avatar answered Oct 04 '22 02:10

Christian Schuster