I want to load my web app inside my iOS application using WKWebView. My web app built with react and has a feature to take a photo inside my app. I am using https://github.com/purple-technology/react-camera-pro for the camera libray. So when opening the camera page from the web app, I requested camera access with
AVCaptureDevice.requestAccess(for: .video) { [weak self] granted in
// send JSBridge event
}
That will show a popup for requesting camera permission for my app
But after that another similar popup will appear.
This is how I create my WKWebView
let config = WKWebViewConfiguration()
config.websiteDataStore = WKWebsiteDataStore.default()
let webView = WKWebView(frame: CGRect.zero, configuration: config)
I want to remove the second request permission popup because it just feel useless because I already approve the first permission. Is there any way to do this?