From c15c6648bc8e6c608e799bb876a92ee7accdc177 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Mon, 18 Dec 2017 15:39:42 +0100 Subject: [PATCH] avoid app to be suspended before being able to start long running task --- Classes/LinphoneAppDelegate.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index dbae90a62..1e373ac96 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -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