CFBundleIdentifier and user application access

Q: My application will not stay selected when trying to limit a user's access to it in the Accounts preference pane. What is wrong?

A: Your application is probably missing the CFBundleIdentifier key from its Info.plist file. This key is a unique identifier for your application on the system. It has a String value, recommended to resemble a Java package, such as com.mycompany.MyApp.

The "Accounts" preference pane allows an Administrator to limit a user's access to specific applications. This access control is currently implemented using the CFBundleIdentifier key. If this key is undefined, or not unique in your application, System Preferences will not know how to find or identify your application. As a result, your application will stay unchecked the next time you open the Accounts pane, even if it was checked by an Administrator. This also means, then, that the desired access control for your application will not occur.

This problem is one of many reasons to make sure your application has an existing and unique CFBundleIdentifier value. Other areas of the system, such as the CFBundle and CFPreferences APIs, also depend on this key to function properly.

Note: Most Xcode templates give a generic default value for CFBundleIdentifier to try to avoid as many problems as possible. It is still important to set your own unique value, however, as applications with identical CFBundleIdentifier values will override each other.

Document Revision History

DateNotes
2005-02-08Describes the role of CFBundleIdentifier in limiting a user's application access.

Posted: 2005-02-08


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.