Hi,
I have an application that needs to use WKWebView to display a map. This is a requirement from Apple as UIWebView will be deprecated by the end of this year.
In both UIWebView and Safari, the website with a map gets displayed correctly but in the WKWebView the following call generates an error:
https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json
"An error occurred trying to load the resource".
As result, the map is never displayed.
Has anyone experienced this issue?
Thanks!
I modified my app to point to the following site in esri:
https://developers.arcgis.com/javascript/3/
the app using WKWebView fails to display the sample map.
However, if I use safari in the iPad simulator the same page displays the sample map without trouble.
Here it is with WKWebView:
The same page displays just fine in the iPad simulator safari browser:
Anybody else has this issue?
Hi,
I have the same problem.
I get the following error running it on my iPad "Request header field Cache-Control is not allowed by Access-Control-Allow-Headers".
Have you found a solution to the problem?
Br.
Kasper
Hi Kasper,
The error we were facing was related to the handling of self signed certificates in the didReceiveAuthenticationChallenge method. Basically, we were cancelling all requests if they didn't match one of our host domains. Instead we needed to call PerformDefaultHandling in the completionHandler.
I think your issue is different... it sounds like the server side needs to change to allow Cache-Control in your Access-Control-Allow-Headers setting.