Every time I changed the config.xml, I ran
- Code: Select all
cordova clean
cordova build ios
Then run in simulator.
As far as I could tell, all of the records were needed due to the requirements of my app. I expect that the start up issue is resolved by :
- Code: Select all
<plugin name="cordova-plugin-whitelist" source="npm" />
<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />
I think instead of using wildcard "*", it could be "self" instead. If your app has any chance of running outside code, you would want to limit that down. My app does not have any external integration at all.
I literally took every cordova provided config.xml setting that I could find, put in the file and then backed out until I got to what was needed since I don't see any documentation regarding this and iOS10.
also these became necessary for "downstream" errors after the startup
- Code: Select all
<preference name="AllowInlineMediaPlayback" value="true"/>
<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
and these plug ins
- Code: Select all
<plugin name="cordova-plugin-wkwebview-engine" source="npm"/>
<plugin name="cordova-plugin-file" source="npm" />
<plugin name="cordova-plugin-media" source="npm" />
In the end, I just took the project related construct 2 created items from the construct created config.xml and put them into the cordova created xml. I expect that it could be done the other way (take the cordova created items and move to the construct created file). I think if the project level comfig.xml file as gone and the config.xml that construct creates has everything included, it will work. I just didn't have time or energy to test that out.
Another thing I did along the way because some of these base plugins had a lot of warnings in xcode, I ran cordova platform update to be sure all of that is current. I think there were still about 7 warnings from inAppBrowser and Canvas2Image to fix. But, those don't affect the running of the app.
Do you have two config.xml files in the project structure? One at the root and then one in the www folder that copies out of the construct build?
Going forward, ideally the construct2 export would include the security settings needed for the construct2 provided plugins and options in the config.xml file. Then we could just use that file. It's just unfortunate that these settings became required by iOS10 and nobody knew ahead of time.