SCCameraKitARInputDelegate

Objective-C

@protocol SCCameraKitARInputDelegate

Swift

protocol ARInputDelegate

Propogates ARKit session delegate methods back to CameraKit. If you implement your own AR Input, you MUST call these methods when their corresponding ARKit delegate methods are called.

  • Method to call when the input receives session:didAddAnchors:

    Declaration

    Objective-C

    - (void)input:(nonnull id<SCCameraKitARInput>)input
        didAddAnchors:(nonnull NSArray<ARAnchor *> *)anchors;

    Swift

    func input(_ input: ARInput, didAdd anchors: [ARAnchor])

    Parameters

    input

    the sending input

    anchors

    the anchors passed to the delegate

  • Method to call when the input receives session:didUpdateAnchors:

    Declaration

    Objective-C

    - (void)input:(nonnull id<SCCameraKitARInput>)input
        didUpdateAnchors:(nonnull NSArray<ARAnchor *> *)anchors;

    Swift

    func input(_ input: ARInput, didUpdate anchors: [ARAnchor])

    Parameters

    input

    the sending input

    anchors

    the anchors passed to the delegate

  • Method to call when the input receives session:didRemoveAnchors:

    Declaration

    Objective-C

    - (void)input:(nonnull id<SCCameraKitARInput>)input
        didRemoveAnchors:(nonnull NSArray<ARAnchor *> *)anchors;

    Swift

    func input(_ input: ARInput, didRemove anchors: [ARAnchor])

    Parameters

    input

    the sending input

    anchors

    the anchors passed to the delegate