views:

266

answers:

3

Hey.
I want to have an URI for my app. For example something like this:
app name:GetIt
uri: getit://

Is there an easy way to create one?

+2  A: 

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.

Peter Hosey
A: 

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.

Brad Larson
+1  A: 

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.

Matt Stevens