Open angela-tithi opened 3 years ago
@alon22 please help :(
@alon22 okay, update is that I followed https://ionicframework.com/docs/native/firebase-vision this link, and used
this.firebaseVision.barcodeDetector(FILE_URI) .then((res: Barcode[]) => console.log(res)) .catch((error: string) => console.error(error));
//FILE_URI: File URI or Base64 Format FirebaseVisionPlugin.barcodeDetector(FILE_URI, (json) => { console.log(json); }, (error) => { console.error(error);; }) })
,but now I am getting "Cannot find FirebaseVisionPlugin" :(
You should to be able to user the promise with the latest version of @ionic-native/firebase-vision.
If you not use ionic-native, you have to add declare var FirebaseVisionPlugin
at top of your page.
Thanks Alonso!
I added declare var FirebaseVisionPlugin at top and it worked. But I got into another trouble. At first I provided base64 image, but got the error "unsupported URL", next I changed "destinationType: this.camera.DestinationType.FILE_URI" this configuration in the camera options and provided the file uri, but also got this "Image URL required" error. It would be very helpful if I can provide the base64 image as input. Please help me out @alon22 :(
To use base64 image the string must be contain data:image/jpeg;base64,
or data:image/png;base64,
. If you are using camera-plugin add one of the two options at start of the result.
@alon22 Thank you so much for your help Alonso! It worked! I have one more question left. Does this PhaseScriptExecution error cause any problem while uploading the app to the app store?
@alon22, I uploaded the app in app store, it didn't cause any problem fortunately , but can you please try to solve the phase exception error that is occurring? :( Whenever I build the project it is hard to look for other errors that occur :(
Hi, I need to know more about this pluggin. How do I make it work? Do I have to add a new plugging for the Base64 thing? Please help I'm a little lost
I used this plugin in my Ionic 3 project, I got this error as per the issue written in "Know Issues" section - PhaseScriptExecution [CP] Copy Pods Resources; and my build failed.
So because the suggestion was to run project from Xcode, I opened the .xcworkspace file in xcode and ran the project. But I got this error -
ERROR: ERROR Error: Uncaught (in promise): TypeError: Object(WEBPACK_IMPORTED_MODULE_2ionic_native_core["cordova"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_2ionic_native_core["cordova"])(this, "barcodeDetector", {}, arguments)', 'Object(WEBPACK_IMPORTED_MODULE_2ionic_native_core["cordova"])' is an instance of Object)
Is this occurring because of incompatibility of ionic version? Please help me out!