Add an additional guard against background fetching when APNs is enabled

This commit is contained in:
nielsandriesse 2020-05-26 12:03:29 +10:00
parent 51ac1a3639
commit 39bf983cd0
1 changed files with 2 additions and 0 deletions

View File

@ -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];