0

I have the problem described here in a cordova app: iOS9 ATS: what about HTML5 based apps?

... I don't see an Info.plist outside of the platforms/ios directory that I can add that config to. Everything inside platforms/ios gets clobbered/replaced when I build the app.

So, is there a way to update the Info.plist with that new config that is permanent?

Thanks!

Community
  • 1
  • 1
jsharpe
  • 2,546
  • 3
  • 26
  • 42
  • you can create a plugin without native code and make the plugin.xml write values on the .plist – jcesarmobile Sep 17 '15 at 07:45
  • If you want to automate a build, you could parse that file with some XML parser (or just using regular expressions), inject the option and write file back. – Michael Radionov Sep 17 '15 at 08:00

1 Answers1

0

In my projects I'm using my own cordova-ios fork which has a mentioned by you change in the template project's Info.plist file (it requires cordova platform add url_to_your_fork), although you can invoke in your <PROJECT_NAME>/platforms/ios/<PROJECT_NAME>:

/usr/libexec/PlistBuddy <PROJECT_NAME>-Info.plist -c "Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool true"

Straight after cordova platform add ios, or add it as a Cordova after_platform_add hook

Maciek Czarnik
  • 5,950
  • 2
  • 37
  • 50