cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shazron <...@git.apache.org>
Subject [GitHub] cordova-plugin-media-capture pull request #79: CB-12882: (ios): adds support...
Date Tue, 06 Jun 2017 23:49:30 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message