Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Application Registration

All applications available on the user’s system must be registered to make them known to Launch Services and copy their document binding and other information into its database. It isn’t ordinarily necessary to perform this task explicitly, since a variety of utilities and services built into the Mac OS X system software take care of it automatically:

In spite of these automatic registration utilities, it may sometimes be necessary to register an application explicitly with Launch Services. For example, although developers are encouraged to package their applications so that they can be installed by simply dragging them onto the user’s disk, some applications may require more elaborate custom installer software. In such cases, the installer should call one of the Launch Services registration functions LSRegisterFSRef or LSRegisterURL to register the application explicitly.

The registration functions take a Boolean parameter, inUpdate, which controls the function’s behavior when the application being registered already exists in the Launch Services database. If this parameter is true, Launch Services unconditionally reregisters the application, replacing any previous information that may already exist for it in the database; if the parameter is false, the application is reregistered only if its current modification time is more recent than that recorded in the database.

After making any significant change in an application’s Launch Services–related information, you should either reregister the application explicitly, by calling LSRegisterFSRef or LSRegisterURL with inUpdate set to true, or update the modification time of the application to ensure that it will be updated by the automatic registration utilities described above.

Note: You can update an application’s modification time using the BSD touch command in a Terminal window. For example, the command touch /Applications/TextEdit.app sets the modification time of TextEdit to the current time.



< Previous PageNext Page > Hide TOC


Last updated: 2007-08-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice