iOS - Archiving "bitcode bundle" could not be generated - Flutter

1.5k views Asked by At

I am facing this issue and unable to release the app in Appstore. App is already in App Store and i want to release a new version now. This issue is in my latest build . I am able to build the product and its also running properly on iOS devices. When i select product==> archive then its showing as build failed.

error ==>

ld: bitcode bundle could not be generated because '/Users/XXX/XXX/XXX/ios/Flutter/Flutter.framework/Flutter' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/XXX/XXX/XXX/ios/Flutter/Flutter.framework/Flutter' for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

pubspec.yaml ==> razorpay_flutter: ^1.1.3

xcode version ==> Version 11.2.1

In my podfile.lock ==>

razorpay-pod (1.1.5)

razorpay_flutter (1.1.5): Flutter razorpay-pod

In my pod file ==>

platform :ios, '10.0' use_frameworks!

config.build_settings['ENABLE_BITCODE'] = 'YES'

config.build_settings['SWIFT_VERSION'] = '5.2'

Please help.

Thanks, Shruti

2

There are 2 answers

1
shruti tupkari On BEST ANSWER

Implementing below 2 steps in Xcode solved this issue.

  1. Runner -> ['ENABLE_BITCODE'] = 'NO'
  2. File -> workspace settings --> Build system --> set -->legacy build system.
0
daniel-sc On

Disabling ENABLE_BITCODE resolved this.

The following should be part of the Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end