canOpenURL always returns no although LSApplicationQueriesScheme are set
| Originator: | janrose.1986 |
|
| Number: | rdar://26799594 |
Date Originated: | 14-Jun-2016 11:58 PM |
| Status: | Open |
Resolved: | 18-Jul-2016 08:23 AM |
| Product: | iOS SDK |
Product Version: | 10.0 Beta1 14A5261v |
| Classification: | |
Reproducible: | always |
Summary:
UIApplication canOpenURL: always returns no for a given URL although the URL is set in the Info.plist LSApplicationQueriesSchemes array
Console shows -canOpenURL: failed for URL: "<xyz>" - error: "This app is not allowed to query for scheme <xyz>"
Steps to Reproduce:
1. Add URL to Info.plist LSApplicationQueriesSchemes (i.e. "SomeApplication"
2. test if app is installed by calling UIApplication canOpenURL with url "SomeApplication://"
Expected Results:
Returns YES if SomeApp app is installed, NO otherwise
Actual Results:
Returns NO even if the app is installed
Console shows -canOpenURL: failed for URL: "SomeApplication" - error: "This app is not allowed to query for scheme someapplication"
Duplicates
Comments
ag9zfm9wZW5yYWRhci1ocmRyEgsSBVJhZGFyGICAgPDIt_8IDA
Please note:
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!
Do you have an update from Apple on this bug? From my duplicate i see it as closed.
In combination with radar 21789675 for iOS 9 it would be necessary to have all URL-schemes in lowercase and CamelCase in the Plist. to be compatible with iOS 9 and iOS 10
Turns out this is a problem of capitalization. URL-schemes in the Plist now have to be supplied in all lowercase as the param passed to canOpenURL: now seems to be converted to lowercase before it's compared to the plist in a case-sensitive way. supplying the Info.Plist values in lowercase solves the issue.