Returns the location of a resource contained in the specified bundle.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The bundle to examine.
The name of the requested resource.
The abstract type of the requested resource. The type is expressed as a filename extension, such as
resourceis the complete name of the file you’re looking for, including any extension.
The name of the subdirectory of the bundle’s resources directory to search. Pass
NULLto search the standard CFBundle resource locations.
A CFURL object describing the location of the requested resource, or
NULL if the resource cannot be found. Ownership follows the The Create Rule.
For example, if a bundle contains a subdirectory
Water that includes a file
Water1, you can retrieve the URL for the file using: