avoid app to be suspended before being able to start long running task

This commit is contained in:
Jehan Monnier 2017-12-18 15:39:42 +01:00
parent 2e3b4b7501
commit c15c6648bc

View file

@ -620,9 +620,8 @@ didInvalidatePushTokenForType:(NSString *)type {
[[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:categories];
}
[LinphoneManager.instance setupNetworkReachabilityCallback];
dispatch_async(dispatch_get_main_queue(), ^{
[self processRemoteNotification:payload.dictionaryPayload];
});
//to avoid IOS to suspend the app before being able to launch long running task
[self processRemoteNotification:payload.dictionaryPayload];
}
- (void)pushRegistry:(PKPushRegistry *)registry