There are situations when applications do not want Universal Links to be handled by the System, but prefer the link to be opened in the WKWebView itself. For example, when using a WKWebView in a "private browsing" mode as specified by [WKWebsiteDataStore nonPersistentDataStore], the hosting WKWebView application should be able to prevent opening the Universal Link from opening the native application.
Steps to Reproduce:
1. Install and log into the LinkedIn app
2. Create WKWebView with [WKWebsiteDataStore nonPersistentDataStore]
3. Navigate to search engine and search for a LinkedIn user's profile
4. Click on the user's profile
Application should be able to disable the system opening the LinkedIn app.
LinkedIn app is launched, user unexpectedly looses private context.
iOS 9.3.2 (13F69)
Created attachment 362139 [details]
achristensen@, please take a look. This was the suggested method to support blocking universal links from opening native applications when a user is within a "private" browsing mode. Thank you!
This is absolutely the approach I suggested, and I think it looks good. However, adding private functions won't help you. We will have to do the internal process to get new public API approved, which will not be documented in Bugzilla. This patch gives us a starting point, though. Thanks!
Yes,, they would need to be made public. No problem, please let me know if there is anything I can do to help. Thank you for taking a look!
(Should I follow up on submitting this change or will it remain in this state and just be replicated later on if the internal processes approves a public version?)