Returns an application’s main bundle.
- iOS 2.0+
- macOS 10.0+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
A CFBundle object representing the application’s main bundle, or
NULL if it is not possible to create a bundle. Ownership follows the The Get Rule.
CFBundle creates a main bundle whenever it possibly can, even for unbundled apps. There are a few situations in which it is not possible, so you should check the return value against
NULL, but this happens only in exceptional circumstances.