Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically register a custom URL scheme?

Is it possible to add/remove custom URL schemes for my application while it's running? Right now the CFBundleURLSchemes property is set in Info.plist.

like image 844
jlstrecker Avatar asked Mar 28 '11 19:03

jlstrecker


1 Answers

According to this discussion on Cocoa Dev the answer is no, custom URL schemes can't be registered programmatically. You must specify them in Info.plist. (but using LSRegisterURL, you can ask Launch Services to reload your application's Info.plist if you programmatically change it. But that's ugly.).

like image 127
smokris Avatar answered Oct 11 '22 05:10

smokris