Protocols

The following protocols are available globally.

  • 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
  • An LCSurface is a UI interaction layer with an LCMicroService.

    See more

    Declaration

    Objective-C

    @protocol LCSurface <NSObject>

    Swift

    protocol LCSurface : NSObjectProtocol