mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 462 forks source link

Some FYI for Android and iOS use #49

Closed gkd720 closed 4 years ago

gkd720 commented 6 years ago

Works great! Not really an "issue", just some notes since I just got this working in Android and iOS. I'm using VS Code. For Android, I did the AndroidManifest, gradel, and pubspec edits, and installed the "Kotlin Language" extension (in VSCode), then "flutter packages get". Worked as expected in the simulator (qemu86). Flutter build and install to an Android also worked as expected for barcodes and QR codes. For iOS, updated info.plist. In VSCode, picked iOS simulator (part of Xcode). When run, gets "The user did not grant the camera permission!”. So I figured I'd just get it onto a device and see what happens. I connected an iPod Touch (iPhone without the phone), but "flutter doctor" doesn't fully see it and wants "brew install ideviceinstaller". Did this under ~/development (not VSCode's directory), but said it was already installed. Oh well. So I opened Xcode pointing to ...//ios/Runner.xcworkspace/. Now gets multiple warnings and errors, like MTBScanner.m out of date, needing team for signing, etc. Searched, and fixed these up, also addressing keys (, Allow Always), “ipod busy”, “setting up debugging”, etc. Finally, it built with 1 warning: something about wanting to remove unnecessary files and enable some warnings. Just let it continue and load onto the Touch. Starts up, and works! So, thanks for a great package. Feel free to mark as closed if this distorts any issue stats.