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





How to install Maven on Eclipse


Hello everybody,

   Today I am going to show you how to import and use maven on eclipse.

1.    Open Eclipse IDE

2.    Click Help -> Install New Software...

3.    Click Add button at top right corner

4.    At pop up: fill up Name as "M2Eclipse" and Location as "http://download.eclipse.org/technology/m2e/releases" orhttp://download.eclipse.org/technology/m2e/milestones/1.0

5.    Now click OK
After that installation would be started.








6.Then you just need to open your project, and setup your pom.xml properly:




and then import your project.




Another way to install Maven plug-in for Eclipse:
1.    Open Eclipse
2.    Go to Help -> Eclipse Marketplace
3.    Search by Maven
4.    Click "Install" button at "Maven Integration for Eclipse" section
5.    Follow the instruction step by step
After successful installation do the followings in Eclipse:
1.    Go to Window --> Preferences
2.    Observe, Maven is enlisted at left panel
Finally,
1.    Click on an existing project
2.    Select Configure -> Convert to Maven Project


NOTE:
If you need to add any Maven library or dependency, execute the following:
mvn install:install-file
   -Dfile=<path-to-file>
   -DgroupId=<group-id>
   -DartifactId=<artifact-id>
   -Dversion=<version>
   -Dpackaging=<packaging>
   -DgeneratePom=true
Where: <path-to-file>  the path to the file to load
   <group-id>      the group that the file should be registered under
   <artifact-id>   the artifact name for the file
   <version>       the version of the file
   <packaging>     the packaging of the file e.g. jar
Or you manually add as below on your pom.xml file:



Happy coding,
Thiago