I'm working on an app that supports iOS 8 and 9, using WKWebView for some views in my app.
For the time-being I've whitelisted my site and subdomains in ATS (awaiting some SSL cert changes). So I don't think what I'm going to describe is related to ATS, but who knows.
My native code calls a javascript function in my WKWebView that triggers an ajax GET request using jQuery.
In iOS 8, it works every time.
In iOS 9, it works only sometimes. Seemingly less than half the time.
When I use Safari Developer Console on the desktop that my iPhone is connected to, to hook up to the WKWebView, I am able to see this error:
Failed to load resource: cancelled
As far as I can tell, the network request is never even made. I've been staring at this problem for 2 days now, and am not able to discern WHY the network request is "cancelled." I do call .abort() on my ajax requests in certain situations, but while I diagnose this issue, I've commented all of those out.
Has anyone else experienced any new ajax issues like this in iOS 9 that weren't happening in iOS 8?
Any idea how I can figure out what is "cancelling" the ajax request? I've tried every debugging trick I can think of, but it's not that easy to debug WKWebView ajax.