O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSBundle — Mac OS X 10.0

Synopsis

This class represents directories in the filesystem that contain executable binaries, and any resources needed by the executable, such as images, sounds, or nibs. For more information about NSBundle, see Chapter 2.

image with no caption

@interface NSBundle : NSObject
                                  // Convenience Constructors
   + (NSBundle *)bundleForClass:(Class)aClass;
   + (NSBundle *)bundleWithIdentifier:(NSString *)identifier;
   + (NSBundle *)bundleWithPath:(NSString *)path;
                                  // Initializers
   - (id)initWithPath:(NSString *)path;
                                  // Class Methods
   + (NSArray *)allBundles;
   + (NSArray *)allFrameworks;
   + (BOOL)loadNibFile:(NSString *)fileName 
                                 externalNameTable:(NSDictionary *)context 
                                 withZone:(NSZone *)zone;
   + (BOOL)loadNibNamed:(NSString *)nibName 
                                 owner:(id)owner;
   + (NSBundle *)mainBundle;
   + (NSString *)pathForResource:(NSString *)name 
                                 ofType:(NSString *)ext 
                                 inDirectory:(NSString *)path;
   + (NSArray *)pathsForResourcesOfType:(NSString *)ext 
                                 inDirectory:(NSString *)subpath;
   + (NSArray *)preferredLocalizationsFromArray:(NSArray *)localizationsArray;
   + (NSArray *)preferredLocalizationsFromArray:(NSArray *)localizationsArray           
                                 forPreferences:(NSArray *)preferencesArray;
                                  // Instance Methods
   - (NSString *)builtInPlugInsPath;
   - (NSString *)bundleIdentifier;
   - (NSString *)bundlePath;
   - (Class)classNamed:(NSString *)className;
   - (NSAttributedString *)contextHelpForKey ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required