Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8870439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:43:51+00:00 2026-06-14T17:43:51+00:00

I have created an application that exposes a OSX service for certain file by

  • 0

I have created an application that exposes a OSX service for certain file by adding an NSService entry into my applications info.plist (as in http://www.macosxautomation.com/services/learn/), but I find that upon installing my application on a new machine the service doesn’t show up quickly in the finder right click context menu.

I know that this is because pasteboard services hasn’t re-indexed the /Applications folder and “discovered” the newly installed service.

I also know that I can force a re-index and discovery by manually running /System/Library/CoreServices/pbs.

The question here is what is the best way to ensure that my service shows up as quickly as possible for users who are installing my application for the first time.

I could execute a system call to “/System/Library/CoreServices/pbs” when my application starts up –If the user immediately starts my application–, but that only partly solves the problem (in addition I wonder if there is a better Cocoa API based way of doing this).

If my application is generally only accessed via the context menu, a user will never think to go out and start the application in the first place. They will only think it is broken when the context menu isn’t there.

I am not distributing my application with an installer. I am simply providing a bundle that can be dragged and dropped into /Applications (as I believe Apple usually suggests).

Is there a way to expedite the process of service discovery when doing an installation in this fashion, so that there isn’t any period of time where the user is without the newly installed service?

As a side note, it appears that the problem may not exist in 10.8 (or at least be as pronounced). Apple may have made this indexing happen more quickly in their most recent release.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:43:52+00:00Added an answer on June 14, 2026 at 5:43 pm

    I’ve actually ended up using

    system("killall pbs;/System/Library/CoreServices/pbs -flush");
    

    in one of my apps, just as you describe, though it’s a long time ago, when 10.5 was in question as well.

    You might want to try this function, however:

    void NSUpdateDynamicServices(void)
    

    which according to the documentation acts just like flushing pbs, but is a cleaner solution.

    Also, if (according to your description), the app is nothing but a service, consider making it a really just a service – see (Installing the Service)

    To build a standalone service, use the extension .service and store it in Library/Services.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a server application that exposes a certain model, and set of services
I've created an application that exposes a self-hosted OData web service. The web service
I have created an application that connect on a web-server and reads an xml
I have created an application that uses settings.settings to store some user specific settings
I have created an application that records a series of longitude and latitude values
I have created an application that creates bar graph based on inputs read from
I have a problem regarding Android App. I have created an application that download
I have created an android application that calls (using kSOAP library) a SOAP based
I have created one application in flex that is accessing the Java webservice using
I have created an application server side that will create a pdf of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.