Post

Replies

Boosts

Views

Activity

Reply to Forcing a `WKWebsiteDataStore` proxy change onto existing connections without losing session state
Is there any WebKit-specific error handling for when something with the proxy configuration goes wrong? In the failure cases I've been able to test — e.g. failing authentication with the proxy server — WebKit surfaces it through the navigation delegate's didFailProvisionalNavigation callback as a generic: "Could not connect to the server." — NSURLErrorCannotConnectToHost (code -1004) Since that's indistinguishable from an ordinary connectivity failure, is there any way to tell proxy/relay failures apart from normal browsing errors? I would want to be able to surface a distinct "proxy unavailable" state to the user rather than a generic connection error.
Topic: WebKit SubTopic:
WebViews Q&A
1d
Reply to Universal Links not working even though all debug steps succeed
We figured it out. It is because our app is a browser app. Apps that have the com.apple.developer.web-browser managed entitlement may not claim to respond to Universal Links for specific domains. The system will ignore any such claims. Apps with the entitlement can still open Universal Links to other apps as usual. From https://developer.apple.com/documentation/xcode/preparing-your-app-to-be-the-default-browser It would be great to link this information in the Universal Link debugging so that it is an easy check for folks! I had to dig through the logs to determine it could be an issue with the fact that this was a browser app.
Topic: App & System Services SubTopic: General Tags:
Jan ’25
Reply to Forcing a `WKWebsiteDataStore` proxy change onto existing connections without losing session state
Is there any WebKit-specific error handling for when something with the proxy configuration goes wrong? In the failure cases I've been able to test — e.g. failing authentication with the proxy server — WebKit surfaces it through the navigation delegate's didFailProvisionalNavigation callback as a generic: "Could not connect to the server." — NSURLErrorCannotConnectToHost (code -1004) Since that's indistinguishable from an ordinary connectivity failure, is there any way to tell proxy/relay failures apart from normal browsing errors? I would want to be able to surface a distinct "proxy unavailable" state to the user rather than a generic connection error.
Topic: WebKit SubTopic:
WebViews Q&A
Replies
Boosts
Views
Activity
1d
Reply to Forcing a `WKWebsiteDataStore` proxy change onto existing connections without losing session state
Right, if we could ensure that when you configured the proxy on the existing store and reloaded the current webview you would be connected to the proxy then we would not need to swap the data store at all.
Topic: WebKit SubTopic:
WebViews Q&A
Replies
Boosts
Views
Activity
1d
Reply to Forcing a `WKWebsiteDataStore` proxy change onto existing connections without losing session state
I guess I am hoping to understand if it is strange or an anti pattern to build a new store every time you turn your proxy on/off. Up until now we have always used the default provided store for every webview: WKWebsiteDataStore.default.
Topic: WebKit SubTopic:
WebViews Q&A
Replies
Boosts
Views
Activity
1d
Reply to \Forcing a WKWebsiteDataStore proxy change onto existing connections without losing session state
This is a duplicate of https://developer.apple.com/forums/thread/830125. Please ignore in favor of https://developer.apple.com/forums/thread/830125
Topic: WebKit SubTopic:
WebViews Q&A
Replies
Boosts
Views
Activity
1d
Reply to Universal Links not working even though all debug steps succeed
We figured it out. It is because our app is a browser app. Apps that have the com.apple.developer.web-browser managed entitlement may not claim to respond to Universal Links for specific domains. The system will ignore any such claims. Apps with the entitlement can still open Universal Links to other apps as usual. From https://developer.apple.com/documentation/xcode/preparing-your-app-to-be-the-default-browser It would be great to link this information in the Universal Link debugging so that it is an easy check for folks! I had to dig through the logs to determine it could be an issue with the fact that this was a browser app.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Universal Links not working even though all debug steps succeed
Update: Based on the documentation in Debugging Universal Links I updated the associated domains to use the wildcard instead of blog.mozilla.org but it still is not working. It is now: applinks:*.mozilla.org
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25