Saturday, January 2, 2016

IOS App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.

Today's session I would like to show an issue that I recently had on my MAC, Xcode 7.2.

The description is:

2016-01-02 20:11:59.657 CrossoverNodeApp[3124:90587] Could not load the "crossover.png" image referenced from a nib in the bundle with identifier "IOS.CrossoverNodeApp"
2016-01-02 20:11:59.675 CrossoverNodeApp[3124:90631] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.


In order to fix this:

1- Go to your app folder:
2-Select the project-plist file

2.1-Click on icon add or '+' on Information property List

3-Add App Transport Security Settings
 

4-Add Allow Arbitrary Loads, change it to YES.

5-Add Exception Domains and add into it the host that is failing, in my case localhost.



6- The expected result of plist file should looks like this:


6-1- If you prefer doing this change from plist file perspective, here it is how it goes:


then you are good to run your app again...




Happy coding..

Thiago L.

-----------------------------------------------
Other great IOS articles:
IOS Exceptions:
http://thiagoleoncio.blogspot.com/2016/03/ios-exceptions.html

IOS - 3 big reasons why start coding in swift instead of Objective-C
http://thiagoleoncio.blogspot.com/2015/11/3-big-reasons-why-start-coding-in-swift.html

IOS - Video using 3D framework
http://thiagoleoncio.blogspot.com/2015/11/ios-application-using-3d-framework.html

IOS - Video Application with Json and Mysql connection
http://thiagoleoncio.blogspot.com/2015/09/ios-application-with-mysql-database.html

IOS - How to create Multiple views
http://thiagoleoncio.blogspot.com/2015/08/ios-how-to-create-multiple-views-in.html





No comments:

Post a Comment