I have an app that has a wkwebview. What I need help with is when a user clicks on a link inside the webview, it opens up in Safari. But, if they click on a link with the same domain, it opens in the webview.
For example. If the webview opens up apple.com and a user click on a link that opens up apple.com/iphone I want it to open inside the webview. But, if they click on a link that opens google.com, I want it to open in the safari app. Can you give me some code so I can implement this?
(this is an iOS app using swift 3)