• 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
Re: Registering a protocol handler for an App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Registering a protocol handler for an App


  • Subject: Re: Registering a protocol handler for an App
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 30 Jan 2009 20:13:01 -0600

On Jan 30, 2009, at 10:58 AM, Dave wrote:

In order to register an Application to handle a protocol, do I have to change anything other than add URL Types in the Plist file? I'm having problems with my application not being opened when a protocol request is sent with a protocol ID that my App is registered for, e.g. it's Plist file says it should handle it.

By "protocol" I'm assuming you mean a URL scheme, right? Perhaps you can show the XML for that part of your Info.plist.


Do have to change anything else?

Well, Launch Services should launch your app without you having to do anything else, but your app won't do anything unless you register a handler for the 'GURL' (get URL) Apple Event.


http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/chapter_11_section_4.html


Do I have to do something special at install or run time?

No. During development it's sometimes the case that the Finder or Launch Services doesn't realize that your app's capabilities have changed. The new Info.plist isn't rescanned to update the system caches. If you duplicate your app in the Finder, does the new copy get opened for the URL scheme?


Lastly, are you sure there isn't some other application that claims the same scheme? If there is, it's up to the system to decide which to use for a given scheme, unless the user has specified a preference.

There is no central system-provided GUI for the user to specify their preference for handlers for URL schemes. Safari's preferences let you specify the preferred handler for http: and Mail's for mailto:. You can implement a similar interface using LSSetDefaultHandlerForURLScheme, but you should only do so in response to the user expressing their preference. It's bad form to "steal" that preference from the user.

Cheers,
Ken

_______________________________________________

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


References: 
 >Registering a protocol handler for an App (From: Dave <email@hidden>)

  • Prev by Date: Re: KeyDown woes =(
  • Next by Date: Re: Determining Previous Front Process
  • Previous by thread: Registering a protocol handler for an App
  • Next by thread: Core Data, Garbage Collection and SQL Store
  • Index(es):
    • Date
    • Thread