-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add qr scanner #357
base: master
Are you sure you want to change the base?
Conversation
About the CDN script: What about installing jsqr via npm and copying the js file to the assets directory as part of the postinstall/prebuild step? |
This looks awesome! I honestly thought this would have been more of a headache but you proved otherwise. I agree with @julianpoemp - would be best if we could build the ugly parts (minified) of that HTML at build time if possible. What do you think? |
It's not possible import a local JavaScript file from HTML, the only viable option is create a custom script that embed jsqr library from node_modules. |
perhaps a static web server would be possible (https://github.com/futurepress/react-native-static-server). You could serve the html file and its assets using a static web server. Don't know if this is a solution since resources are consumed to run a webserver that are not needed if the script is directly embedded to the HTML file. On the other hand it would makes handling the html file easier. Just an idea to throw in :) |
I just added a nodejs script that builds the HTML file with jsqr dependency, also excluded HTML bundled from git |
Thank you @QuinsZouls - I hope you'll bear with me, I'm not able to review and merge this yet but will try to get to it at the start of this coming week. Very excited for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of items to check.. But if I get time before you do @QuinsZouls to check this, I might just merge and tackle it myself. I'd also like to use this functionality for adding vaults from the desktop app quickly.. So it's a very handy piece of functionality.
And if you'd have time to check the podfile lock conflict too, that'd be great. I had to do a larger update to get the new 2.6.2 build working, so it might be wise to just delete the lock and install from scratch again. |
Unfortunately, my Xcode has updated, so I'm not longer able to compile and run for IOS. |
I pushed the merge from master. |
To clarify: It worked on the simulator as you showed, but not on a real device. |
I think it's a permission problem, probably on a bare metal devices need camera permission to work properly. |
Hope to see this in the app soon :) |
This PR Solves #310
What's includes:
Tested on Android SDK 30 and iOS 16 emulators.
What's next:
Notes:
Preview