NativeScript / mlkit

Apache License 2.0
24 stars 9 forks source link

iOS Vue MLKObjectDetectorOptions not defined #52

Open mastashake08 opened 1 year ago

mastashake08 commented 1 year ago

When I run the code I am getting this error Uncaught ReferenceError: MLKObjectDetectorOptions is not defined

Steps to recreate

Load MLKitView in app.js

import MLKit from '@nativescript/mlkit-core/vue'

Vue.use(MLKit)

Load view in Home.vue

<MLKitView cameraPosition="back" detectionType="all" :detection="onDetection" />

Run code

ns run ios

Error log

 ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error: Uncaught ReferenceError: MLKObjectDetectorOptions is not defined
  at
  _setupObjectDetection(file: app/webpack:/magic-app/node_modules/@nativescript/mlkit-core/index.ios.js:324:0)
  at _setupDetectors(file: app/webpack:/magic-app/node_modules/@nativescript/mlkit-core/index.ios.js:187:0)
  at initNativeView(file: app/webpack:/magic-app/node_modules/@nativescript/mlkit-core/index.ios.js:85:0)
  at setNativeView(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:746:0)
  at _setupUI(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:719:0)
  at (file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:726:0)
  at eachChildView(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0)
  at eachChild(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view/view-common.js:811:0)
  at _setupUI(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:725:0)
  at (file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:726:0)
  at eachChildView(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/content-view/index.js:65:0)
  at eachChildView(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/page/page-common.js:106:0)
  at eachChild(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view/view-common.js:811:0)
  at _setupUI(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:725:0)
  at _addViewCore(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:544:0)
  at _addView(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/core/view-base/index.js:530:0)
  at UIViewControllerImpl.viewWillAppear(file: app/webpack:/magic-app/node_modules/@nativescript/core/ui/page/index.ios.js:116:0)