olexale / flutter_mrz_scanner

Scans MRZ (Machine Readable Zone) from identity documents.
MIT License
51 stars 43 forks source link

How to get the example project working #14

Open okayfine opened 3 years ago

okayfine commented 3 years ago

Tested Device: iPhone 8 Plus running ios14 (physical device) First make sure that you use these packages in your pubspec.yaml flutter_mrz_scanner: ^1.0.0 permission_handler: ^4.0.0

After first build or before you build, set the podfile information as follows

# Uncomment this line to define a global platform for your project
platform :ios, '12.0'

save your podfile.

Go to your runner project Change [com.example.] to something else. Change your runner deployment to 9.0

in Flutter under terminal, issue the following command flutter build ios Check if the error at the end of terminal output you are getting the following

Xcode's output:
↳
    warning: [CP] Unable to find matching .xcframework slice in ' false ios-arm64/libtesseract.framework
    ios-x86_64-maccatalyst/libtesseract.framework ios-x86_64-simulator/libtesseract.framework' for the current build
    architectures (armv7 arm64).
    Artifact list stored at
    /Users/lionellobo/Desktop/programming/Flutter/mrz_test/build/ios/Release-iphoneos/cocoapods-artifacts-Release.tx
    t
    /Users/lionellobo/Desktop/programming/Flutter/mrz_test/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error:
    module 'flutter_mrz_scanner' not found
    @import flutter_mrz_scanner;
     ~~~~~~~^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
    deployment target versions is 9.0 to 14.0.99. (in target 'permission_handler' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
    deployment target versions is 9.0 to 14.0.99. (in target 'Flutter' from project 'Pods')

Encountered error while building for device.

The above error is just pod spec deployment in the mrz ios Project and not yours, you can ignore it. Just run the app and ignore that error.

Thoughts on the project. It is an excellent project, I can't thank the Author enough. It is working on iPhone, I will also get it tested on an Android Device and get back the results. It is taking time to read the MRZ that is because of lot of factors like lighting and so on. <3 thank you again