Fix for iOS 9 and failed url.createInputStream


#1

Just a heads up:

Built my app with the iOS 9 Beta 4 SDK today. url.createInputStream() was giving a null result everytime, regardless of the url. Tried it with the JUCE demo, and got the same result in the HTTP section. 

Turns out iOS 9 has introduced a new feature called App Transport Security that by default requires secure connections (https). You can read more about it here: http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ 

I'm not dealing with sensitive information. So instead of transitioning the relevant urls on my site to SSL, I added the following to info.plist:

<key>NSAppTransportSecurity</key>
    <dict>
        <!--Include to allow all connections-->
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

Which allows regular http connections. You also have the option of adding specific domains to be allowed, instead of all. Maybe provide this as an option in Introjucer? 

 

 


#2

Yes, that's a great idea. I had a look at it and I would add another option "App Transport Security" to the Introjucer iOS exporter build settings with these three mutually exclusive options:

- Disallow insecure connections
- Allow insecure connections to any domain
- Allow insecure connections to the following domains only: [text field]

That sounds like the right thing to do, doesn't it?

However I would prefer to not add that feature now, but only when the iOS 9 SDK is actually released. Is that OK for you?

 

 


#3

That'd be great, thanks!