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

// FREEBIE
This commit is contained in:
Matthew Chen 2017-11-07 10:46:03 -05:00
parent 5cc292fb6c
commit 593c684fcb

View file

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