iOS 9 Content Loading Problem


#1

Hi
on ios 9 iget this message:
Failed to load resource:xxx The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

Thanks,
Daniel


App transport Security has blocked a clearText Http in ios excode
Having cors issue on simulator
#2

The error is saying that you need to use a secure connection, in other words https rather than http. This is not an ionic issue, but a new ios9 requirement


Ios 9.0.1: $http requests to server that supports TLS v1.2 with valid certificate result in CFNetwork SSLHandshake failed
#3

At the moment the new security method of iOS 9 doesn’t work even if your source uses TLS 1.2 and https. I suppose Cordova needs an update.

As a workaround you can add the following code in your app’s .plist (usually platforms/ios/<appname>/<appname>-Info.plist) to allow all network requests.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

Source: http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/


#4

Thanks for the fix @ohh2ahh worked like a charm. I recently submitted an app and ran into quite a few errors. I cuagulated the errors and their fixes for other Ionic developers trying to use iOS 9 http://blog.tylerbuchea.com/ios9-and-ionic-build-warnings/ If anyone has run into other errors or has input on the current ones please message me and I’ll try and flesh out the info.


#5

Thanks for the blog post, I had the same issue with the iPad Settings Error and your solution worked for me.


#6

You can add the entry by creating a hook in your project hooks/after_prepare/, it will inject the needed lines on the info.plist

https://gist.github.com/felipew/6e73a3d52607288f64b5

Best Regards


#7

Currently I have one drawback to load an external page within a view of ionic , I have CodeSigning- > ProvisioningProfile -> [ developer ] , the view I load normal, but when I put the profile of production do not load the https view of an external. HELP…