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

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

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

Loading…
Cancel
Save