Bundle
public extension Bundle
-
Property that returns the unique identifier of the CheetahDigitalUtils.
Declaration
Swift
static var CheetahDigitalUtilsIdentifier: String { get }
-
Returns all Cheetah Loyalty bundles/frameworks.
Declaration
Swift
static var cheetahBundles: [Bundle] { get }
-
Returns the very first test bundle found if any
Note
Usually used for a framework’s internal testingDeclaration
Swift
static var testBundle: Bundle? { get }
-
Finds the bundle that contains the specified resource. This will first search for the resource in the main bundle and if it is not found, it will continue to search in the other Cheetah Loyalty bundles/frameworks.
Declaration
Swift
static func bundle(forResource resource: String?, withExtension resourceExtension: String?) -> Bundle?
Parameters
resource
The name of the resource file as a
String
. If you specify nil, the method returns the first resource file it finds with the specified extension.resourceExtension
The extension of the resource file as a
String
. If extension is an empty string or nil, the extension is assumed not to exist and the file URL is the first file encountered that exactly matches name.Return Value
The
Bundle
that contains the specified resource. Returns nil if it cannot find the bundle containing the specified resource. -
Finds the bundle that contains the specified file name. This will first search for the resource in the main bundle and if it is not found, it will continue to search in the other Cheetah Loyalty bundles/frameworks.
Declaration
Swift
static func bundle(forFileName fileName: String) -> Bundle?
Parameters
fileName
The name of the resource file along with it’s extension as a
String
.Return Value
The
Bundle
that contains the specified resource. Returns nil if it cannot find the bundle containing the specified resource.