Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top