LCAddOnFactory

@interface LCAddOnFactory : NSObject

An LCAddOnFactory creates instances of LCAddOn

  • Default initializer for the factory.

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Creates an instance of the add-on.

    Declaration

    Objective-C

    - (id<LCAddOn>)createInstance;

    Swift

    func createInstance() -> LCAddOn!

    Return Value

    a new instance of the add-on

  • Registers an LCAddOnFactory factory with LiquidCore.

    Declaration

    Objective-C

    + (void)registerAddOnFactory:(NSString *)module
                         factory:(LCAddOnFactory *)factory;

    Swift

    class func register(_ module: String!, factory: LCAddOnFactory!)

    Parameters

    module

    The native binding module (<module>.node) to be associated with this factory

    factory

    instance of LCAddOnFactory to handle binding module