MBModule Protocol Reference

Conforms to MBInstanceVendor
Declared in MBModule.h

Overview

Modules are the mechanism by which functionality is added to Mockingbird.

Related sets of code are exposed as modules, each of which is represented by an MBModule singleton instance.

Each module has an associated logger, which can be used to report module-specific information to the console.

+ moduleName required method

Returns the name of the module.

+ (nonnull NSString *)moduleName

Return Value

The module name.

Declared In

MBModule.h

+ log required method

Returns the MBModuleLog associated with the receiving module.

+ (nonnull MBModuleLog *)log

Return Value

The module log.

Declared In

MBModule.h

+ resourceBundle

Returns an NSBundle instance representing the resource bundle of the module.

+ (nullable NSBundle *)resourceBundle

Return Value

The module’s resource bundle, or nil if one doesn’t exist.

Declared In

MBModule.h

+ environmentLoaderClasses

This optional method is implemented by modules that participate in the environment loading process. When the module is activated, its associated environment loaders will be used to populate the current environment.

+ (nullable NSArray *)environmentLoaderClasses

Return Value

The environment loader classes used by the module. nil is an acceptable return value to indicate that the module has no associated environment loaders.

Declared In

MBModule.h

+ moduleEnvironmentFilename

This optional method is implemented by modules that need a specific environment file included whenever a new environment is loaded. If the method is not implemented or if it returns nil, no attempt will be made to load an environment file for the module.

+ (nullable NSString *)moduleEnvironmentFilename

Return Value

The name of the environment file to load. Note that this is a filename and not a full pathname.

Declared In

MBModule.h