Re: Setting default application for URL scheme
Re: Setting default application for URL scheme
- Subject: Re: Setting default application for URL scheme
- From: "Matthew Gertner" <email@hidden>
- Date: Fri, 16 May 2008 17:57:10 +0200
This works like a charm except for one thing. After I register my
handler, it gets requests to load a new URL as expected the app is
already running. If the app isn't running, I see the dock slide over
slightly like it's about to open a new bundle, then it slides back and
the app doesn't open. If I rebuild the Launch Services database using
lsregister then it works fine. Is there some way to rebuild the
database programmatically, or is there something else I need to do
besides calling LSSetDefaultHandlerForURLScheme? I tried calling the
undocument function _LSSaveAndRefresh after I register the handler,
but that doesn't seem to help.
Thanks in advance,
Matt
On Fri, May 16, 2008 at 5:49 PM, Matthew Gertner
<email@hidden> wrote:
> This works like a charm except for one thing. After I register my
> handler, it gets requests to load a new URL as expected the app is
> already running. If the app isn't running, I see the dock slide over
> slightly like it's about to open a new bundle, then it slides back and
> the app doesn't open. If I rebuild the Launch Services database using
> lsregister then it works fine. Is there some way to rebuild the
> database programmatically, or is there something else I need to do
> besides calling LSSetDefaultHandlerForURLScheme? I tried calling the
> undocument function _LSSaveAndRefresh after I register the handler,
> but that doesn't seem to help.
>
> Thanks in advance,
> Matt
>
> On Thu, May 15, 2008 at 12:23 AM, Jens Alfke <email@hidden> wrote:
>>
>> On 14 May '08, at 2:25 PM, Nick Zitzmann wrote:
>>
>>> That's the best way to do it. However, some programs tend to override the
>>> user's choices for default URL handlers.
>>
>> The proper UI is to show a pop-up menu (in your app's prefs) of applications
>> that handle this scheme, with the current default one selected, and let the
>> user pick. That's what Safari, iChat, Mail, etc. all do.
>>
>> —Jens
>> _______________________________________________
>>
>> 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
>>
>
>
>
> --
> *** Note that my email has changed to email@hidden.
> Please update your address book accordingly. ***
>
--
*** Note that my email has changed to email@hidden.
Please update your address book accordingly. ***
_______________________________________________
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