Hello,
I try to create a simple app. I using a NKWebView. Everything works fine. But i using a QrScanner. When i using Safari, the page/scanner works fine. But inside the app not. When i reload the page inside my app, the message on the image will popup after reload every time. I click every time on "Allow" but is not working. But what I make wrong?
I added NSMicrophoneUsageDescription
and NSCameraUsageDescription
to my info.plist
This is my view code.
import UIKit
import WebKit
class ViewController: UIViewController {
let webView = WKWebView()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
view.addSubview(webView)
guard let url = URL(string: "https://DOMAIN.io") else {
return
}
webView.configuration.allowsInlineMediaPlayback = true
webView.load(URLRequest(url:url))
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
webView.frame = view.bounds
}
}