Don't ask for camera permissions if app is not active.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 5cc292fb6c
commit 593c684fcb

@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
}); });
}; };
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive) { if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
DDLogError(@"Skipping camera permissions request when app is not active."); DDLogError(@"Skipping camera permissions request when app is in background.");
callback(NO); callback(NO);
return; return;
} }
@ -85,8 +85,8 @@ NS_ASSUME_NONNULL_BEGIN
}); });
}; };
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive) { if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
DDLogError(@"Skipping microphone permissions request when app is not active."); DDLogError(@"Skipping microphone permissions request when app is in background.");
callback(NO); callback(NO);
return; return;
} }

Loading…
Cancel
Save