Locate a bundle given its program-defined identifier.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The identifier of the bundle to locate. Note that identifier names are case-sensitive.
A CFBundle object, or
NULL if the bundle was not found. Ownership follows the The Get Rule.
For a bundle to be located using its identifier, the bundle must already have been loaded. The principal purpose for locating bundles by identifier is for code in frameworks or plugins to find its own bundle.
Bundle identifiers are created by entering a value for the key
CFBundle in the bundle’s
To ensure uniqueness, you should create bundle identifiers with the form of reverse-DNS naming style package names, such as
If a bundle object is created and the bundle file structure later deleted from the filesystem, this function will still return the original bundle object.