Github user shazron commented on a diff in the pull request: https://github.com/apache/cordova-plugin-media-capture/pull/79#discussion_r120506321 --- Diff: src/ios/CDVCapture.m --- @@ -292,6 +295,65 @@ - (CDVPluginResult*)processVideo:(NSString*)moviePath forCallbackId:(NSString*)c return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:fileArray]; } +- (void)showAlertIfAccessProhibeted +{ + if (![self hasCameraAccess]) { + [self showPermissionsAlert]; + } +} + +- (BOOL)hasCameraAccess +{ + if (![AVCaptureDevice respondsToSelector:@selector(authorizationStatusForMediaType:)]) { + return YES; + } --- End diff -- Just a note here regarding iOS support for this plugin. The code is sound, but this selector already exists since iOS 7. I'm wondering if we should add iOS engine restrictions to this plugin's plugin.xml instead of all this runtime checking. FYI The latest cordova-ios only supports iOS 9 or greater.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org