• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom URL Handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom URL Handling


  • Subject: Custom URL Handling
  • From: Jacob Bandes-Storch <email@hidden>
  • Date: Sat, 9 Aug 2008 13:53:49 -0700

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom URL Handling
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: Re: Problem with friend function and gcc 4.2 with
  • Next by Date: Re: Does [NSApp setApplicationIconImage] leak memory?
  • Previous by thread: [MEET] Syracuse Area CocoaHeads
  • Next by thread: Re: Custom URL Handling
  • Index(es):
    • Date
    • Thread