canOpenURL: shouldn’t log anything when there’s no error

Originator:nicolas.bouilleaud
Number:rdar://22051675 Date Originated:2015-07-29
Status:Open Resolved:
Product:iOS SDK Product Version:9.0 (13A4305g)
Classification:Other Issue Reproducible:Always
 
On iOS9, canOpenURL: only works if the url scheme is declared in Info.plist. However, canOpenURL logs an unnecessary message to syslog even when the url scheme was correctly configured in Info.plist.

Steps to Reproduce:
Add a specific app URL scheme to LSApplicationQueriesSchemes in the Info.plist, and call canOpenURL: on it.

Expected Results:
canOpenURL: should simply return YES or NO, depending on whether a compatible app is installed on the device.

Actual Results:
canOpenURL: does return the correct value, but if no app is installed, syslog contains this line:
`canOpenURL: failed for URL: “urlscheme://“ - error: “(null)”`



Version:
iOS 9.0 (13A4305g)

Notes:
This behaviour is intended and documented in https://developer.apple.com/videos/wwdc/2015/?id=703, page 24 of the PDF.

I believe this is unneeded, and actually not very helpful. It logs a correct usage of the API, and it looks similar to the real “This app is not allowed to query for scheme” messages.

In general, unwanted logs add noise, and hide real problems.

Comments


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!