I've been working on a simple app that makes a webview of a website where students can take exams.
So basically the problem I have is that when students are done, they have to click on a button that will send the answers. A popup will appear to make them confirm. https://i.stack.imgur.com/5GhB8.png Except that it doesn't show up. Nothing happens when the button is pushed. It works flawlessly on Safari and I've noticed that it works on the deprecated webview (UIWebview) but I've been trying to make it work on WKWebView.
I'm definitely no swift expert so I apologize if the answer is easy. I've been trying to find some answers about my problem but I'm not sure how to implement it.
Thank you in advance for any help,
import UIKit
import WebKit
class webViewController: UIViewController {
@IBOutlet weak var webview: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
let lien = "***"
if let url = URL(string: lien) {
let request = URLRequest(url: url)
_ = webview.load(request);
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}