• 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
What makes a URL Handler be persistent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What makes a URL Handler be persistent?


  • Subject: What makes a URL Handler be persistent?
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 14 Nov 2012 16:48:07 -0800

Normally, if a URL-handling app is not running, and user visits a URL with that app's scheme, Mac OS X launches the app.  My app's URL handler only works when my app is running.  That's not so bad, but I have one user reporting that it *never* works.  I presume the issues are related and need to understand what's going on.

If I "visit" a URL with my app's scheme in Safari, while my app is *not* running, Safari displays a page saying "Safari can't open … because OS X doesn't recognize internet addresses starting with <myUrlScheme>".

I understand that registered URL schemes are persisted in Launch Services plist files.  When I run this command…

defaults read com.apple.LaunchServices LSHandlers | grep LSHandlerURLScheme

I get about 20 URL schemes: http, https, mailto, github-mac, etc., including some targeting apps that I haven't used in years.  But my app's url scheme *never* shows up in there.  Why not?

Now, my app itself does not handle the URL directly.  The URL handler is actually installed in a faceless helper app which is in the main app's Contents/Helpers/ directory.  (This was done so I could control whether or not my app is activated.)  Here is the code:

NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager] ;
[appleEventManager setEventHandler:self
                       andSelector:@selector(handleGetURLEvent:withReplyEvent:)
                     forEventClass:kInternetEventClass
                        andEventID:kAEGetURL] ;

Also, the trouble started with this particular user when he installed an update in which I had changed the *name* of the helper.  So I was wondering if maybe Launch Services still had the old name, but that's when I found out that in fact it had neither.

Why might my URL handler not be persistent?

Thanks,

Jerry Krinock
_______________________________________________

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: What makes a URL Handler be persistent?
      • From: Jens Alfke <email@hidden>
    • Re: What makes a URL Handler be persistent?
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Mysterious crash report
  • Next by Date: Re: Mysterious crash report
  • Previous by thread: Re: Mysterious crash report
  • Next by thread: Re: What makes a URL Handler be persistent?
  • Index(es):
    • Date
    • Thread