Tutorial by Examples

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. NSBundle *mainBundle; // Get the main bundle for the app; mainBundle = [NSBundle mainBundle]; Getting a reference to ...
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 NSBundle *myBundle; // obtain a reference to a loadable bundle myBundle = [NSBundle bundleWithPath:@"/Library/MyBundle.bundle...

Page 1 of 1