I had the same problem with my cordova project (actually Ionic v1) and I fixed it with the following command:
cordova plugin add https:
This will install a web server that runs locally and after that the error should go away. After running this command, just run:
cordova prepare ios
or remove all plugins and reinstall:
rm -rf plugins/ cordova platform add ios
Make sure this is in your config.xml file:
<access origin="*" /> <feature name="CDVWKWebViewEngine"> <param name="ios-package" value="CDVWKWebViewEngine" /> </feature> <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
source share