|
|
@@ -77,6 +77,18 @@
|
|
|
[self.captureSession startRunning];
|
|
|
}
|
|
|
|
|
|
+ } else {
|
|
|
+
|
|
|
+ NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
|
|
|
+ NSString *appName = [infoDict objectForKey:@"CFBundleDisplayName"];
|
|
|
+ __weak typeof(self) weakSelf = self;
|
|
|
+ UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Warning" message:[NSString stringWithFormat:@"Camera access denied, please change %@ setting, allow App use camera. (setting -> privacy -> camera enable %@)",[UIDevice currentDevice].model,appName] preferredStyle:UIAlertControllerStyleAlert];
|
|
|
+ UIAlertAction *action = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
+ [weakSelf dismissViewControllerAnimated:YES completion:nil];
|
|
|
+ }];
|
|
|
+ [alert addAction:action];
|
|
|
+ [self presentViewController:alert animated:YES completion:nil];
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -147,7 +159,7 @@
|
|
|
if (![self camerAuthorization]) {
|
|
|
|
|
|
NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
|
|
|
- NSString *appName = [infoDict objectForKey:@"CFBundleName"];
|
|
|
+ NSString *appName = [infoDict objectForKey:@"CFBundleDisplayName"];
|
|
|
__weak typeof(self) weakSelf = self;
|
|
|
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Warning" message:[NSString stringWithFormat:@"Camera access denied, please change %@ setting, allow App use camera. (setting -> privacy -> camera enable %@)",[UIDevice currentDevice].model,appName] preferredStyle:UIAlertControllerStyleAlert];
|
|
|
UIAlertAction *action = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|