0
votes

Trying to use the cordova-ios 4.0 so that I can take advantage of the wkwebview.

On ios9 devices, everything works using the wkwebview. On ios8 and ios9 devices, XHR requests do not work at all when using the uiwebview (and ios8 seems to use the uiwebview instead of wkwebview).

If I "downgrade" to cordova-ios 3.8, everything works fine. I have the whitelist plugin installed, with the following in my config.xml:

<access origin="*" />
<access origin="tel:*" launch-external="yes" />
<access origin="geo:*" launch-external="yes" />
<access origin="mailto:*" launch-external="yes" />
<access origin="sms:*" launch-external="yes" />
<access origin="market:*" launch-external="yes" />
<allow-navigation href="*" />
<allow-intent href="*" />
<allow-navigation href="*" />

Weirdly, the config.xml seems to be ignored. When I build with cordova-ios 3.8, I get the splash screen, icon, etc. When I build with cordova-ios 4.0 everything is just generic cordova icon/splash.

I have also added the NSAppTransportSecurity bit to the plist file, though for ios8 it shouldn't make any difference.

The XHR calls I'm trying to make have CORS enabled on the server.

Specifically, I need help trying to figure out why I cannot make XHR requests on cordova-ios 4.0.

1

1 Answers

0
votes

So, apparently I needed to install the whitelist plugin at version 1.1.1-dev, rather than 1.0.0. I'm not sure what exactly the difference is, but the former fixes whatever issue I was having. Whoops.