9

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.

2 Answers 2

7

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.).

Sign up to request clarification or add additional context in comments.

1 Comment

The link is 404
1

Launch Services will do that. Have a look at the Launch Services Programming Guide and the Launch Services Reference for details.

(Edit: Launch Services is what you want, but the function I mentioned was for changing the default handler.)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.