You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
Confirmed as a long-standing Apple bug that has been present in WKWebView since at least iOS 10.
Existing workarounds did not work for JSONP calls.
Existing workarounds for other calls were rendered ineffective after Apple stopped including cookies in response headers.
There's a workaround.
1. Update platform to v2.8.6
"platform_version": "v2.8.6"
2. Prime cookie store
When your app first starts up, use the new forge.tools.setCookie() API to set a dummy cookie for the domain(s) you are going to be making calls to.
For example:
forge.tools.setCookie("trigger.io", "/api/v1/auth/hello", "foo", "bar", function () {
// cookie has been set and cookie store has been synchronized
// continue with normal startup, make JSONP calls etc.
});
This seems to "prime" the cookie store which then responds to the cookies sent by the server.
Only the first parameter, the domain, matters. You can set any value for the other parameters unless you wanted to provide a specific cookie.
It's essential that subsequent app startup happens in the completion callback as setting cookies and flushing the cookie storage is an asynchronous operation.
Device information:
App information:
To Reproduce
Expected behaviour
Cookies are set.
Actual behaviour
Cookies are not set.
TypeError: undefined is not an object (evaluating 'window.forge._receive')
The text was updated successfully, but these errors were encountered: