I just Start xcode 7 stable version. In my current project I am downloading images from webservice. In xcode 6.4 was working fine. Now it's not showing any image and show warning in log
-canOpenURL: failed for URL: "itms-books://" - error: "This app is not allowed to query for scheme itms-books"
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.
This is a new enforced security measure that apple has implemented on any app that is build in iOS 9.
The only solution so far is to add an entry in the info.plist file with the Key LSApplicationQueriesSchemes and add "itms-books" and any other url scheme that your app will be linking to in this array.
The main explanation for this move from apple is that some apps used to exploit the functionality of the canOpenURL: method to scan which apps where installed in your phone to target you with selective ads or other "not so benevolent" motives.
Keep in mind that there is a cap in the amount of apps you can register which is 50.
You might also need to add to the plist another key called LSApplicationQueriesSchemes (type array) And add the 'itms-books' scheme to it as a string item, to allow the canOpenURL to test against it.
I found my issue i was added key in info.plist file.
Add Dictionary NSAppTransportSecurity -> add new boolean key name NSAllowsArbitraryLoads in project's info.plist file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With