• 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: problems dynamically specifying services for my application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems dynamically specifying services for my application


  • Subject: Re: problems dynamically specifying services for my application
  • From: Evan Gross <email@hidden>
  • Date: Mon, 17 May 2004 01:31:31 -0400

On 5/14/04 12:35 PM, "Mark Munz" <email@hidden> wrote:

Hi,

I've run into this kind of thing as well when working on Spell Catcher X's
add-on services, perhaps not exactly the same, but I couldn't find "the"
solution.

> I'm trying to dynamically set up services for my background application.
>
> I've setup ~/Library/Services/myService.service folder with an
> info.plist
>

Tried this.

> When my app launches, it calls [NSApp setServiceProvider:myObj] where
> myObj is a myServicePort object (sublcass of NSObject)
> btw.. my background application lives inside another application bundle
> (ie. it's not in the Services folder).
>

I don't do this, the services are provided by the Spell Catcher app itself.

> The services show up, but when I select the service, I get the
> following error:
>
> LSOpenFromURLSpec() returned -1 for application
> /Volumes/Files/me/Library/Services/myService.service/myServicePort path
> (null).
>

I never saw this exact message, perhaps because what I put in my Info.plist
wasn't quite the same as yours. I WAS able to get things working with Cocoa
apps, but Carbon apps - forget it. Obviously a completely different method
of locating the service provider is used by the OS for Carbon apps.

I got errors related to execv() or something like that - it was a while ago.
No Carbon app would work with add-on services advertised in this way.

> I've tried setting various keys in the info.plist. Everything from just
> listing the Services array to adding NSPrincipleClass -> NSServices,
> CFBundleIdentifier, etc I keep getting the same error.
>

I tried everything I could think of, which was a lot, but perhaps not all
there was to try. Spent days on it. Got nowhere.

> My understanding is that dynamic services were flaky early on (10.0,
> partially fixed in 10.1 and finally fixed in 10.2), but that they
> should work now. Unfortunately, there's very little documentation on
> what keys are needed for it to work correctly.
>
> Any ideas on how to get this to work?
>

I don't think it works quite right yet - better than in Jaguar, but still
not the way you (we) want it to.

> I could resort to the old way (write an application that passes the
> service request on) and dynamically change it's info.plist -- but that
> has always seemed a hack, especially since dynamic service support is
> supposed to be there.
>

I found no other way to do it besides this. I don't love it, but it works on
10.2 and 10.3.

If you find (or have found) a solution, I'd love to hear it!

Evan Gross
Rainmaker Research Inc.
www.rainmakerinc.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Pinning to arbitrary NSSlider values
  • Next by Date: Textfields, formatters, localize and using binding.
  • Previous by thread: problems dynamically specifying services for my application
  • Next by thread: implementing isEqual: ?
  • Index(es):
    • Date
    • Thread