iOS9 does not load insecure resources from a secure page (SSL/HTTPS)
This is not related to ATS. WebKit enforces a mixed content policy that disallows access to certain classes of "active" content (JS, CSS, etc) from being loaded over an insecure connection when the host page is being served over https.
If you examine your page in the Inspector you will see this being reported in the error panel.
Follow up: You can't turn off mixed content blocking. Allowing insecure CSS or JS reduces the security of the entire page to that of the least secure resource. The solution if you must load css/js over http is to load the entire page over http. That way the UI seen by the user correctly reflects the security of the content.
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection
I have solved it with adding some key in info.plist.
The steps I followed are:
Opened my Project target's
info.plist
fileAdded a Key called
NSAppTransportSecurity
as aDictionary
.Added a Subkey called
NSAllowsArbitraryLoads
asBoolean
and set its value toYES
as like following image.
Clean the Project and Now Everything is Running fine as like before.
Ref Link: https://stackoverflow.com/a/32609970
EDIT:
OR In source code of info.plist
file we can add that:
NSAppTransportSecurity
NSAllowsArbitraryLoads
NSExceptionDomains
yourdomain.com
NSIncludesSubdomains
NSThirdPartyExceptionRequiresForwardSecrecy
iOS9 getting error “an SSL error has occurred and a secure connection to the server cannot be made”
For the iOS9, Apple made a radical decision with iOS 9, disabling all unsecured HTTP traffic from iOS apps, as a part of App Transport Security (ATS).
To simply disable ATS, you can follow this steps by open Info.plist, and add the following lines:
NSAppTransportSecurity
NSAllowsArbitraryLoads
Related Topics
Are Nslayoutconstraints Animatable
Xcode 6 iPhone Simulator Application Support Location
Uploading Image with Afnetworking 2.0
Select Multiple Images (Uiimagepickercontroller or Photos.App Share Ui)
Behaviour for Significant Change Location API When Terminated/Suspended
Xcode Stuck at "Your Application Is Being Uploaded"
Programmatically Change Rootviewcontroller of Storyboard
iOS 8 Rotation Methods Deprecation - Backwards Compatibility
Required Ipv6 Compatibility - iOS App Rejected by Apple
Ios: Serialize/Deserialize Complex JSON Generically from Nsobject Class
Uibarbuttonitem in Navigation Bar Programmatically
How to Set Up Push Notifications in Swift
How to Format a Double into Currency - Swift 3
Positioning Uitabbar at the Top
Working with C APIs from Swift
Xcode Nsmanagedobject Subclass Contains Optionals When They Are Marked as Non-Optional