I want to implement a custom URL scheme (such that myscheme:whatever will open my app and somehow pass the URL as a parameter). I've been looking around for information on how to do that, and I'm getting mixed messages.

The Info.plist documentation is very clear, and I've got the keys all set up the right way such that my app opens when a URL of my custom scheme is opened. However, I'm not sure how to find out what URL was opened. I see some implementations use -[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]; with kInternetEventClass and kAEGetURL, and they implement a method (passed into the selector): - (void)handleURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent. In other places, I see LSSetDefaultHandlerForURLScheme, and other LS* stuff. Another thing I've seen is adding a script suite and using performDefaultImplementation and [self directParameter] to get the URL.

So, I need to know what the "right" way to do this is. I don't see any specific information about this in Apple's documentation.

Thanks in advance.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to