Mac OS X 10.10: LSSetDefaultHandlerForURLScheme returns OSStatus -54

Originator:robotspacer
Number:rdar://17601367 Date Originated:08-Jul-2014 10:19 PM
Status:Open Resolved:
Product:OS X Product Version:Mac OS X 10.10 (14A283o)
Classification:Other Bug Reproducible:Always
 
Summary:
Calling LSSetDefaultHandlerForURLScheme doesn’t seem to work in Yosemite—it returns OSStatus error -54. I don’t know if this intentional, and the documentation needs to be updated, or if it’s just a bug.

Steps to Reproduce:
1. Create an app that registers a URL scheme as described here: http://stackoverflow.com/questions/49510/how-do-you-set-your-cocoa-application-as-the-default-web-browser
2. Call OSStatus status = LSSetDefaultHandlerForURLScheme(CFSTR(“myscheme”),(__bridge CFStringRef)bundleID); in the app delegate’s init method

Expected Results:
Either the status should equal 0, or the documentation should clarify that this function is no longer supported.

Actual Results:
The status always returns -54, which seems to be a permissions error.

Regression:
Works fine in 10.9.

Notes:
N/A

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!