Enables stats collection in ML Kit vision. The stats include API call counts, errors, API call
durations, options, etc. No personally identifiable information is logged.
The setting is per FirebaseApp, and therefore per Vision, and it is persistent across
launches of the app. It means if the user uninstalls the app or clears all app data, the setting
will be erased. The best practice is to set the flag in each initialization.
By default the logging is enabled. You have to specifically set it to false to disable
logging.
Gets an instance of Firebase Vision service for the default Firebase app. The default Firebase
app instance must be configured before calling this method; otherwise, raises FIRAppNotConfigured
exception.
Declaration
Swift
classfuncvision()->Self
Return Value
A Firebase Vision service instance, initialized with the default Firebase app.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-02-11 UTC."],[],[],null,["# FirebaseMLVision Framework Reference\n\nVision\n======\n\n class Vision : NSObject\n\nA Firebase service that supports vision APIs.\n- `\n ``\n ``\n `\n\n ### [isStatsCollectionEnabled](#/c:objc(cs)FIRVision(py)statsCollectionEnabled)\n\n `\n ` \n Enables stats collection in ML Kit vision. The stats include API call counts, errors, API call\n durations, options, etc. No personally identifiable information is logged.\n\n \u003cbr /\u003e\n\n The setting is per `FirebaseApp`, and therefore per `Vision`, and it is persistent across\n launches of the app. It means if the user uninstalls the app or clears all app data, the setting\n will be erased. The best practice is to set the flag in each initialization.\n\n \u003cbr /\u003e\n\n By default the logging is enabled. You have to specifically set it to false to disable\n logging. \n\n #### Declaration\n\n Swift \n\n var isStatsCollectionEnabled: Bool { get set }\n\n- `\n ``\n ``\n `\n\n ### [vision()](#/c:objc(cs)FIRVision(cm)vision)\n\n `\n ` \n Gets an instance of Firebase Vision service for the default Firebase app. The default Firebase\n app instance must be configured before calling this method; otherwise, raises FIRAppNotConfigured\n exception. \n\n #### Declaration\n\n Swift \n\n class func vision() -\u003e Self\n\n #### Return Value\n\n A Firebase Vision service instance, initialized with the default Firebase app.\n- `\n ``\n ``\n `\n\n ### [vision(app:)](#/c:objc(cs)FIRVision(cm)visionForApp:)\n\n `\n ` \n Gets an instance of Firebase Vision service for the custom Firebase app. \n\n #### Declaration\n\n Swift \n\n class func vision(app: FIRApp) -\u003e Self\n\n #### Parameters\n\n |-------------|--------------------------------------------------------------------------------------------------|\n | ` `*app*` ` | The custom Firebase app used for initialization. Raises FIRAppInvalid exception if `app` is nil. |\n\n #### Return Value\n\n A Firebase Vision service instance, initialized with the custom Firebase app.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)FIRVision(im)init)\n\n `\n ` \n Unavailable.\n- `\n ``\n ``\n `\n\n ### [barcodeDetector(options:)](#/c:objc(cs)FIRVision(im)barcodeDetectorWithOptions:)\n\n `\n ` \n Gets a barcode detector with the given options. \n\n #### Declaration\n\n Swift \n\n func barcodeDetector(options: FIRVisionBarcodeDetectorOptions) -\u003e FIRVisionBarcodeDetector\n\n #### Parameters\n\n |-----------------|----------------------------------------------------|\n | ` `*options*` ` | Options containing barcode detector configuration. |\n\n #### Return Value\n\n A barcode detector configured with the given options.\n- `\n ``\n ``\n `\n\n ### [barcodeDetector()](#/c:objc(cs)FIRVision(im)barcodeDetector)\n\n `\n ` \n Gets a barcode detector with the default options. \n\n #### Declaration\n\n Swift \n\n func barcodeDetector() -\u003e FIRVisionBarcodeDetector\n\n #### Return Value\n\n A barcode detector configured with the default options.\n- `\n ``\n ``\n `\n\n ### [faceDetector(options:)](#/c:objc(cs)FIRVision(im)faceDetectorWithOptions:)\n\n `\n ` \n Gets a face detector with the given options. \n\n #### Declaration\n\n Swift \n\n func faceDetector(options: FIRVisionFaceDetectorOptions) -\u003e FIRVisionFaceDetector\n\n #### Parameters\n\n |-----------------|--------------------------------------------|\n | ` `*options*` ` | Options for configuring the face detector. |\n\n #### Return Value\n\n A face detector configured with the given options.\n- `\n ``\n ``\n `\n\n ### [faceDetector()](#/c:objc(cs)FIRVision(im)faceDetector)\n\n `\n ` \n Gets a face detector with the default options. \n\n #### Declaration\n\n Swift \n\n func faceDetector() -\u003e FIRVisionFaceDetector\n\n #### Return Value\n\n A face detector configured with the default options.\n- `\n ``\n ``\n `\n\n ### [onDeviceImageLabeler(options:)](#/c:objc(cs)FIRVision(im)onDeviceImageLabelerWithOptions:)\n\n `\n ` \n Gets an on-device image labeler with the given options. \n\n #### Declaration\n\n Swift \n\n func onDeviceImageLabeler(options: FIRVisionOnDeviceImageLabelerOptions) -\u003e FIRVisionImageLabeler\n\n #### Parameters\n\n |-----------------|--------------------------------------------|\n | ` `*options*` ` | Options for configuring the image labeler. |\n\n #### Return Value\n\n An on-device image labeler configured with the given options.\n- `\n ``\n ``\n `\n\n ### [onDeviceImageLabeler()](#/c:objc(cs)FIRVision(im)onDeviceImageLabeler)\n\n `\n ` \n Gets an on-device image labeler with the default options. \n\n #### Declaration\n\n Swift \n\n func onDeviceImageLabeler() -\u003e FIRVisionImageLabeler\n\n #### Return Value\n\n An on-device image labeler configured with the default options.\n- `\n ``\n ``\n `\n\n ### [onDeviceTextRecognizer()](#/c:objc(cs)FIRVision(im)onDeviceTextRecognizer)\n\n `\n ` \n Gets an on-device text recognizer. \n\n #### Declaration\n\n Swift \n\n func onDeviceTextRecognizer() -\u003e FIRVisionTextRecognizer\n\n #### Return Value\n\n A text recognizer.\n- `\n ``\n ``\n `\n\n ### [cloudTextRecognizer(options:)](#/c:objc(cs)FIRVision(im)cloudTextRecognizerWithOptions:)\n\n `\n ` \n Gets a cloud text recognizer configured with the given options. \n\n #### Declaration\n\n Swift \n\n func cloudTextRecognizer(options: FIRVisionCloudTextRecognizerOptions) -\u003e FIRVisionTextRecognizer\n\n #### Parameters\n\n |-----------------|----------------------------------------------------|\n | ` `*options*` ` | Options for configuring the cloud text recognizer. |\n\n #### Return Value\n\n A text recognizer configured with the given options.\n- `\n ``\n ``\n `\n\n ### [cloudTextRecognizer()](#/c:objc(cs)FIRVision(im)cloudTextRecognizer)\n\n `\n ` \n Gets a cloud text recognizer. \n\n #### Declaration\n\n Swift \n\n func cloudTextRecognizer() -\u003e FIRVisionTextRecognizer\n\n #### Return Value\n\n A text recognizer.\n- `\n ``\n ``\n `\n\n ### [cloudDocumentTextRecognizer(options:)](#/c:objc(cs)FIRVision(im)cloudDocumentTextRecognizerWithOptions:)\n\n `\n ` \n Gets a cloud document text recognizer configured with the given options. \n\n #### Declaration\n\n Swift \n\n func cloudDocumentTextRecognizer(options: FIRVisionCloudDocumentTextRecognizerOptions) -\u003e FIRVisionDocumentTextRecognizer\n\n #### Parameters\n\n |-----------------|-------------------------------------------------------------|\n | ` `*options*` ` | Options for configuring the cloud document text recognizer. |\n\n #### Return Value\n\n A document text recognizer configured with the given options.\n- `\n ``\n ``\n `\n\n ### [cloudDocumentTextRecognizer()](#/c:objc(cs)FIRVision(im)cloudDocumentTextRecognizer)\n\n `\n ` \n Gets a cloud document text recognizer. \n\n #### Declaration\n\n Swift \n\n func cloudDocumentTextRecognizer() -\u003e FIRVisionDocumentTextRecognizer\n\n #### Return Value\n\n A document text recognizer.\n- `\n ``\n ``\n `\n\n ### [cloudLandmarkDetector(options:)](#/c:objc(cs)FIRVision(im)cloudLandmarkDetectorWithOptions:)\n\n `\n ` \n Gets an instance of cloud landmark detector with the given options. \n\n #### Declaration\n\n Swift \n\n func cloudLandmarkDetector(options: FIRVisionCloudDetectorOptions) -\u003e FIRVisionCloudLandmarkDetector\n\n #### Parameters\n\n |-----------------|------------------------------------------------------|\n | ` `*options*` ` | Options for configuring the cloud landmark detector. |\n\n #### Return Value\n\n A cloud landmark detector configured with the given options.\n- `\n ``\n ``\n `\n\n ### [cloudLandmarkDetector()](#/c:objc(cs)FIRVision(im)cloudLandmarkDetector)\n\n `\n ` \n Gets an instance of cloud landmark detector with default options. \n\n #### Declaration\n\n Swift \n\n func cloudLandmarkDetector() -\u003e FIRVisionCloudLandmarkDetector\n\n #### Return Value\n\n A cloud landmark detector configured with default options.\n- `\n ``\n ``\n `\n\n ### [cloudImageLabeler(options:)](#/c:objc(cs)FIRVision(im)cloudImageLabelerWithOptions:)\n\n `\n ` \n Gets an instance of cloud image labeler with the given options. \n\n #### Declaration\n\n Swift \n\n func cloudImageLabeler(options: FIRVisionCloudImageLabelerOptions) -\u003e FIRVisionImageLabeler\n\n #### Parameters\n\n |-----------------|--------------------------------------------------|\n | ` `*options*` ` | Options for configuring the cloud image labeler. |\n\n #### Return Value\n\n A cloud image labeler configured with the given options.\n- `\n ``\n ``\n `\n\n ### [cloudImageLabeler()](#/c:objc(cs)FIRVision(im)cloudImageLabeler)\n\n `\n ` \n Gets an instance of cloud image labeler with default options. \n\n #### Declaration\n\n Swift \n\n func cloudImageLabeler() -\u003e FIRVisionImageLabeler\n\n #### Return Value\n\n A cloud image labeler configured with default options."]]