Closed mhtghn closed 5 years ago
I have no clue.. I use this plugin with Angular in production as well and don't have this issue. Also, that error message is super high level and not related to this plugin. Do you have any more detailed messages?
Ok thanks for the response
I am pretty sure this is related to the plugin. Because when I remove the plugin from the project and the app, it works flawlessly.
The way Im implementing the plugin is:
-First i run the command tns add ....
-Then add the BarCodeScanner to the Home Module (Not the App Module because Im using the scanner in the Home Module)
-After in the component (ts) that I want to scan from, I inject the BarCodeScanner in the constructor
-Then in the html file I bind a button to the method that call the scan() from the barCodeScanner
The complete message Im getting in the Device Console is Retrieving resting unlock: 0 HTHangEventCreate: HangTracing is disabled. Not creating a new event.
I will provide you repo where you can reproduce this error soon. Thanks again
Hi, this is the repo
To reproduce exactly what I experience, you can use NativeScript Sidekick, set the BuildType at Cloud, uncheck the Clean Build and set the Build Config at Release and Run on an IOS device. I use iPhone 7+ with iOS 12.4 on it. Hope this can help.
@mhtghn Instead of injecting the barcodescanner in the constructor, please just do it like this: new BarcodeScanner().scan
. That'll work just fine.
Please confirm it fixes the issue and I'll update the readme accordingly, because clearly since Angular 2 this has changed a little..
Yes your solution is working fine. Thanks for your time and help.
Im closing the issue, you can update the ReadMe
Unrelated but Im planning on making few NS plugins, can you provide me with some resources to learn how to do it ?
Hi @EddyVerbruggen
Im using your plugin in one of my Nativescript + Angular App and everything is working fine on iOS Debug Mode but once I install it with the Release Mode (using Nativescript Sidekick) the App crashes on the splash screen and I'm getting the following errors on the Device Console
HTHangEventCreate: HangTracing is disabled. Not creating a new event.
Ive followed the instructions of the ReadMe, and Im using the nativescript-angular usage
Nativescript version 6 nativescript-barcodescanner version 3.2.2