Reputation: 4777
I want to have an URI for my app. For example, if my app's name is "GetIt":
getit://
Is there an easy way to create one?
Upvotes: 2
Views: 818
Reputation: 13343
Unless you're planning to make your application scriptable the simplest method is probably to just register an Apple Event handler for this. CocoaDev has a good example of how to do it.
Upvotes: 1
Reputation: 170317
Additionally, Craig Hockenberry has a nice writeup on implementing custom URL schemes in iPhone applications. I haven't tried this on the desktop in Cocoa, so I don't know how much will translate across.
Upvotes: 0
Reputation: 96373
Create an Apple event handler for the GetURL event, then put a list of URL schemes in your app bundle. Kimbro Staken has a blog post with more details.
I think there's some reusable Cocoa source code floating around that takes care of the AE handler for you, but I forgot its name and where to get it.
Upvotes: 2