Type Method

bundleWithURL:

Returns an NSBundle object that corresponds to the specified file URL.

Declaration

+ (instancetype)bundleWithURL:(NSURL *)url;

Parameters

url

The URL to a directory. This must be a URL for a directory; if it contains any symbolic links, they must be resolvable.

Return Value

The NSBundle object that corresponds to url, or nil if url does not identify an accessible bundle directory.

Discussion

This method allocates and initializes the returned object if there is no existing NSBundle associated with url, in which case it returns the existing object.

See Also

Creating and Initializing a Bundle

+ bundleWithPath:

Returns an NSBundle object that corresponds to the specified directory.

+ bundleForClass:

Returns the NSBundle object with which the specified class is associated.

+ bundleWithIdentifier:

Returns the NSBundle instance that has the specified bundle identifier.

- initWithURL:

Returns an NSBundle object initialized to correspond to the specified file URL.

- initWithPath:

Returns an NSBundle object initialized to correspond to the specified directory.