flutter – Did not construct iOS app after I add Google MLkit Barcode Scanning

0
77


I create an utility Flutter with a barcode scanner. I need to use Google ML Package however after I add the plugin google_mlkit_barcode_scanning, I can construct Android app however the iOS app did not construct.

I’ve this error :

enter image description here

I attempt to change Exclude Structure like this :
enter image description here

And the podfile like this :

platform :ios, '12.0'  # or newer model

...

# add this line:
$iOSVersion = '12.0'  # or newer model

post_install do |installer|
  # add these traces:
  installer.pods_project.build_configurations.every do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
  finish
  
  installer.pods_project.targets.every do |goal|
    flutter_additional_ios_build_settings(goal)
    
    # add these traces:
    goal.build_configurations.every do |config|
      if Gem::Model.new($iOSVersion) > Gem::Model.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
      finish
    finish
    
  finish
finish

However nothing works.

I attempt to launch instance from this : https://github.com/flutter-ml/google_ml_kit_flutter/tree/develop/packages/instance and it is work however I do not discover the distinction between my code and instance code.

thanks 🙂