Getting Bundle by Path
- Locating a Cocoa bundle using its path
To obtain the bundle at a specific path using Cocoa, call the bundleWithPath: class method of the NSBundle
- Locating a Cocoa Foundation bundle using its Path
To obtain the bundle at a specific path using Core Foundation, call the CFBundleCreate function and must use CFURLRef type.
Getting the Main Bundle
- Getting a reference to the main bundle using Cocoa.
To get the main bundle in Cocoa application, call the mainBundle class method of the NSBundle class.
- Getting a reference to the main bundle using Core Foundation.
Use the CFBundleGetMainBundle function to retrieve the main bundle for your C-based application.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0