cordovacordova-iosios-permissions

Is it possible to Always Allow the permission for camera and microphone third-party Apps using Cordova in iOS?


I've created the VideoConferning App for Using Webrtc, and also made the app for using Cordova in ios, but the issue was when I opened the app, each time it triggers the permissions for the camera and microphone. here are my plugins

cordova-plugin-camera 6.0.0 "Camera"
cordova-plugin-file 7.0.0 "File"
cordova-plugin-inappbrowser 5.0.0 "InAppBrowser"
cordova-plugin-media 6.1.0 "Media"
cordova-plugin-network-information 3.0.0 "Network Information"

cordova ios Platform Version;

Installed platforms:
  ios 6.2.0

Ref Image

enter image description here

how to modify the always allow for that permissions?


Solution

  • finally i found the solution for this every time ask permission for cordova ios webview

    Add this Function on CDVWebViewUIDelegate.m

    - (void)webView:(WKWebView *)webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin initiatedByFrame:(WKFrameInfo *)frame type:(WKMediaCaptureType)type decisionHandler:(void (^)(WKPermissionDecision))decisionHandler API_AVAILABLE(ios(15.0)) API_AVAILABLE(ios(15.0)){  decisionHandler(WKPermissionDecisionGrant);
        
    }