yushulx / flutter_barcode_sdk

Build barcode QR detection apps for Windows, Linux, macOS, Android, iOS and web.
https://pub.dev/packages/flutter_barcode_sdk
MIT License
47 stars 18 forks source link

ios release builds failing app store validation: "DynamsoftBarcodeReader contains bitcode" #46

Open alexobviously opened 1 month ago

alexobviously commented 1 month ago

Getting this error when trying to upload an ios release build:

[!] Error uploading ipa file: 
 [Application Loader Error Output]: [ContentDelivery.Uploader.13AE0E350] Asset validation failed (90482) Invalid Executable. The executable 'Runner.app/Frameworks/DynamsoftBarcodeReader.framework/DynamsoftBarcodeReader' contains bitcode. (ID: e1391163-86a4-4b68-933e-568e786c1502)
[Application Loader Error Output]: Error uploading '/var/folders/g9/6mzndxgx1yvd_t88tyh34x9r0000gn/T/2a3b982d-dc9e-4fad-9fa9-88efe1edd923.ipa'.
[Application Loader Error Output]: Asset validation failed Invalid Executable. The executable 'Runner.app/Frameworks/DynamsoftBarcodeReader.framework/DynamsoftBarcodeReader' contains bitcode. (ID: e1391163-86a4-4b68-933e-568e786c1502) (90482)
[Application Loader Error Output]: The call to the altool completed with a non-zero exit status: 1. This indicates a failure.

Not really sure what's going on here, especially considering that the podfile for this package says bitcode is disabled, and I even have a post install step in my podfile that sets it to disabled for every pod.

yushulx commented 1 month ago

@alexobviously Please try the following steps.

  1. Disable Bitcode for the iOS project: Set Enable Bitcode to No for both the Runner target and DynamsoftBarcodeReader framework.
  2. Disable Bitcode in the Podfile: Add the following line to ensure Bitcode is disabled for the entire project:

     post_install do |installer|
       installer.pods_project.targets.each do |target|
         target.build_configurations.each do |config|
           config.build_settings['ENABLE_BITCODE'] = 'NO'
         end
       end
     end
  3. Clean and rebuild the project:

    flutter clean
    flutter build ios --release
alexobviously commented 1 month ago

@alexobviously Please try the following steps.

Thanks for the reply, unfortunately I did already try disabling bitcode in pods in this way and it didn't change anything for me

yushulx commented 1 month ago

@alexobviously I just updated the iOS native lib to v9.6.40, which has removed the bitcode.

image

Please rebuild your project with flutter_barcode_sdk v2.2.8.