Protocols

The following protocols are available globally.

  • Supported addons must expose an object that implements this protocol.

    See more

    Declaration

    Objective-C

    @protocol LCAddOn <NSObject>

    Swift

    protocol LCAddOn : NSObjectProtocol
  • An LCMicroService may have an optional delegate to listen for events on start, exit and error conditions.

    See more

    Declaration

    Objective-C

    @protocol LCMicroServiceDelegate <NSObject>

    Swift

    protocol LCMicroServiceDelegate
  • Clients of an LCMicroService communicate with the JavaScript service through an event emitter interface. To listen for specific events, call LCMicroService.-addEventListener:listener:. The delegates will be called through this protocol.

    In JavaScript, Node.js services trigger events by calling LiquidCore.emit(event, payload). The payload can be any JavaScript object and will get converted to the appropriate object in the host language (Swift/Objective-C).

    See more

    Declaration

    Objective-C

    @protocol LCMicroServiceEventListener <NSObject>

    Swift

    protocol LCMicroServiceEventListener
  • Clients must subclass an LCProcessDelegate to get state change information from the node.js process

    See more

    Declaration

    Objective-C

    @protocol LCProcessDelegate <NSObject>

    Swift

    protocol LCProcessDelegate : NSObjectProtocol
  • Holds a process open while this object is not collected or until -letDie is called.

    See more

    Declaration

    Objective-C

    @protocol LoopPreserver <NSObject>

    Swift

    protocol LoopPreserver : NSObjectProtocol