I wrote a simple app which calls a webview (located at XXXXXX.com/webview.php
This is my code which opens my webview in swift:
if let url = URL(string: "https://www.XXXXXX.com/webview.php") {
let request = URLRequest(url: url)
webView.loadRequest(request)
}
Now, all internal links which are within this webview-system (e.g. /webview_subsite2.php) are opening within this webview. Thats wonderful. BUT I want that all external links (target=_blank) open in Safari-Browser. How can I achieve this?
My previous question was marked as duplicate, but it isnt. The point is, that the above posted code is NOT the call of a link! It is the call of the webview. My question concerns how to open all external links INSIDE this webview, which is located at XXXXXX.com/webview.php (domain censored) in Safari and NOT within this webview-Frame. And a solution in swift is necessary.