Type-Definitions

The following type definitions are available globally.

  • A block containing an array of barcodes or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionBarcodeDetectionCallback)(
        NSArray<FIRVisionBarcode *> *_Nullable, NSError *_Nullable)

    Parameters

    barcodes

    Array of barcodes detected in the image or nil if there was an error.

    error

    The error or nil.

  • A block containing an array of labels or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionCloudLabelDetectionCompletion)(
        NSArray<FIRVisionCloudLabel *> *_Nullable, NSError *_Nullable)

    Parameters

    labels

    Array of labels detected in the image or nil if there was an error.

    error

    The error or nil.

  • A block containing an array of landmark or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionCloudLandmarkDetectionCompletion)(
        NSArray<FIRVisionCloudLandmark *> *_Nullable, NSError *_Nullable)

    Parameters

    landmarks

    Array of landmark detected in the image or nil if there was an error.

    error

    The error or nil.

  • A block containing a text detection or error.

    Declaration

    Objective-C

    typedef void (^FIRVisionCloudTextDetectionCompletion)(
        FIRVisionCloudText *_Nullable, NSError *_Nullable)

    Parameters

    text

    The text detected in the image or nil if there was an error.

    error

    The error or nil.

  • A block containing an array of faces or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionFaceDetectionCallback)(
        NSArray<FIRVisionFace *> *_Nullable, NSError *_Nullable)

    Parameters

    faces

    Array of faces detected in the image or nil if there was an error.

    error

    The error or nil.

  • Type of all facical landmarks.

    Declaration

    Objective-C

    typedef NSString *FIRFaceLandmarkType
  • A callback containing an array of labels or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionLabelDetectionCallback)(
        NSArray<FIRVisionLabel *> *_Nullable, NSError *_Nullable)

    Parameters

    labels

    Array of labels detected in the image or nil if there was an error.

    error

    The error or nil.

  • A block containing an array of texts or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRVisionTextDetectionCallback)(
        NSArray<id<FIRVisionText>> *_Nullable, NSError *_Nullable)

    Parameters

    texts

    Array of texts detected in the image or nil if there was an error.

    error

    The error or nil.