canOpenURL Throws "failed for URL" Error for Whitelisted Scheme

Originator:justatheory
Number:rdar://23022383 Date Originated:2015-10-07
Status:Duplicate of 22495408 (Open) Resolved:
Product:iOS Product Version:9
Classification:Security Reproducible:Always
 
Summary:
I'm using -canOpenURL on UIApplication to see if an application is installed. I've whitelisted the app scheme by adding it to the `LSApplicationQueriesSchemes` array in `Info.plist`. It no longer throws a "This app is not allowed to query for scheme $scheme", but still logs a "failed for URL" error, though the error message is "(null)".

Steps to Reproduce:
* Create a new application.
* Add this code to -viewDidLoad in the view controller:
        [UIApplication.sharedApplication canOpenURL:[NSURL URLWithString:@"fb://"]];
* Add this code to the Info.plist:
        <key>LSApplicationQueriesSchemes</key><array><string>cydia</string></array>
* Run the app on an iOS device (not a simulator)


Expected Results:
Sends this line to the log:

    -canOpenURL: failed for URL: "fb://" - error: "(null)"

Actual Results:
Nothing should appear in the log.

Version:
iOS 9.0

Notes:
Also seen with the iOS 9.1 beta.

Configuration:
iPhone 6, iPhone 6S

Attachments:
'canOpenURL.zip' was successfully uploaded.

Comments

Apple Developer Relations 15-Oct-2015 12:34 PM

Duplicate of 22495408 (Open)

Engineering has determined that your bug report is a duplicate of another issue and will be closed.

The open or closed status of the original bug report your issue was duplicated to appears in the yellow "Duplicate of XXXXXXXX" section of the bug reporter user interface. This section appears near the top of the right column's bug detail view just under the bug number, title, state, product and rank.

If you have any questions or concerns, please update your report directly here: http://bugreport.apple.com/.

By justatheory at Oct. 16, 2015, 4:28 p.m. (reply...)

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!