Adding key to my apps info.plist file at build time for App Transport Security in iOS 9?

After an incredibly infuriating day spent debugging my previously working iOS app following a new dev Mac, replacement iPhone, all with unsupported software (Xcode Beta, iOS 9.1 beta etc). I found out why my app worked in the Corona simulator but not on the Xcode simulator or my device - “App Transport Security”!!! Grrrrr…

I’m pulling images from a server app I wrote in xojo. It uses an unsecured connection. iOS9 now defaults to requiring secure connections. I now plan to rebuild my server app to support TLS, but thats a project for another month. I believe, if I add the following key to my apps info.plist file it will disable App Transport Security for my app. This is all still beta use, so I’m not worried about AppStore rejection.

Can someone format the following:

\<key\>NSAppTransportSecurity\</key\>\<dict\> &nbsp; &nbsp; \<key\>NSAllowsArbitraryLoads\</key\> &nbsp; &nbsp; \<true/\> \</dict\>

to go in my ‘default’ build.settings file:

-- Supported values for orientation:-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait", } }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay UIApplicationExitsOnSuspend = true, CFBundleIconFile = "Icon.png", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFBundleIconFiles = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Icon.png" ,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Icon@2x.png" ,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Icon-72.png" ,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, } }, --[[For Android: androidPermissions = { &nbsp; "android.permission.INTERNET", &nbsp; },]]-- }

See this blog post:

https://coronalabs.com/blog/2015/09/17/about-app-transport-security-ats/

It will give you sample code you can include in your build.settings for this issue.

Rob

Thank you Rob.

whitelisting my FQDN didn’t fix the problem, but disabling App Transport Security for the whole app did. It may be because I’m using a custom port number that whitelisting didn’t work.

This fix is enough to keep me going, until I can rework the server app to support SSL.

Thanks for your help.

See this blog post:

https://coronalabs.com/blog/2015/09/17/about-app-transport-security-ats/

It will give you sample code you can include in your build.settings for this issue.

Rob

Thank you Rob.

whitelisting my FQDN didn’t fix the problem, but disabling App Transport Security for the whole app did. It may be because I’m using a custom port number that whitelisting didn’t work.

This fix is enough to keep me going, until I can rework the server app to support SSL.

Thanks for your help.