From 39bf983cd0c59d0a1c6ecb95c5879c99bd414546 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 26 May 2020 12:03:29 +1000 Subject: [PATCH] Add an additional guard against background fetching when APNs is enabled --- Signal/src/AppDelegate.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 6db7a7c8b..31d3e6c0f 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -1070,6 +1070,8 @@ static NSTimeInterval launchStartedAt; - (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler { + BOOL isUsingFullAPNs = [NSUserDefaults.standardUserDefaults boolForKey:@"isUsingFullAPNs"]; + if (isUsingFullAPNs) { return; } NSLog(@"[Loki] Performing background fetch."); [AppReadiness runNowOrWhenAppDidBecomeReady:^{ NSMutableArray *promises = [NSMutableArray new];