nativescript-barcodescanner icon indicating copy to clipboard operation
nativescript-barcodescanner copied to clipboard

fix: #276 scan on iOS crash

Open bradmartin opened this issue 4 years ago • 6 comments

  • Updates the src and demo to use latest NS and webpack setup.
  • Fix the crash on scan by init the instance of the VolumeObserverClass.

bradmartin avatar Oct 14 '21 18:10 bradmartin

@Atomico001 as @EddyVerbruggen does not seem to have time, could you merge this?

grigala avatar Nov 29 '21 10:11 grigala

@Atomico001 as @EddyVerbruggen does not seem to have time, could you merge this?

I am a simple user, haven't permission to merge. I am waiting for this merge too :)

cristiandaulisio avatar Nov 29 '21 10:11 cristiandaulisio

https://github.com/nstudio/nativescript-plugins/tree/main/packages/nativescript-barcodescanner

That will have this fix, we decided to go ahead and publish a version with the fix as it is needed in many projects that we work on, when and if Eddy comes back around to doing more OSS then we can merge things back together and have a consistent approach without fragmenting the plugin ecosystem. Sadly, at times, with all OSS that is the only option so for now we plan to try and help manage a version under our scope at @nstudio. If that doesn't work, anyone can take this branch/fork with the fix and npm pack it locally and use a tgz dependency in your application with a relative filepath and it will work the same.

bradmartin avatar Nov 29 '21 14:11 bradmartin

Do we have an idea when this can be merged in and new version released?

andrewm-mitchells avatar Jun 24 '22 13:06 andrewm-mitchells

Will this be merged? ios crashes when I call scan on ios 16.1.2 and I urgently need a fix.

I tried to checkout the forked code to publish it to my local repo but can't build because of those 2 errors:

barcodescanner.ios.ts:257:73 - error TS2693: 'WeakRef' only refers to a type, but is being used as a value here.
257         this._scanDelegate = QRCodeReaderDelegateImpl.initWithOwner(new WeakRef(this));

barcodescanner.ios.ts:506:9 - error TS2304: Cannot find name 'AudioServicesPlaySystemSound'.
506         AudioServicesPlaySystemSound(1519);

@EddyVerbruggen could you merge this, if it fixes the ios crash. Thanks

maxximee avatar Dec 30 '22 08:12 maxximee

@maxximee use @nstudio/nativescript-barcodescanner this one is not maintained.

P.S. this has been addressed in the https://github.com/EddyVerbruggen/nativescript-barcodescanner/pull/278#issuecomment-981694534, so please take a time to read previous comments.

grigala avatar Dec 30 '22 13:12 grigala