asset validation failed invalid executable. the executable ‘myapp.app/frameworks/cardio.framework/cardio’ contains bitcode

I encountered this problem after updating to macOS 15 Sequoia and the latest version of Xcode 16. I’m getting this error when trying to publish the build from Xcode.

Does anyone know the solution?

4

I encountered the same issue and resolved it using the following steps:

post_install do |installer|
  react_native_post_install(installer)

  # Path to bitcode_strip
  bitcode_strip_path = `xcrun --find bitcode_strip`.chomp

  def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
    framework_path = File.join(Dir.pwd, framework_relative_path)
    command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
    puts "Stripping bitcode: #{command}"
    system(command)
  end

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
    end

    if target.name == 'YourFramework'
      device_framework_path = 'Pods/YourFramework/YourFramework/YourFramework.xcframework/ios-arm64_armv7_armv7s/YourFramework.framework/YourFramework'
      simulator_framework_path = 'Pods/YourFramework/YourFramework/YourFramework.xcframework/ios-arm64_i386_x86_64-simulator/YourFramework.framework/YourFramework'
      
      # Strip bitcode from both binaries
      strip_bitcode_from_framework(bitcode_strip_path, device_framework_path)
      strip_bitcode_from_framework(bitcode_strip_path, simulator_framework_path)
    end
  end
end

Explanation:

  1. Bitcode Stripping: This script uses the bitcode_strip tool to remove bitcode from specified frameworks.
  2. Paths: Make sure to replace 'YourFramework' with the actual name of your framework.

Reference:

For more context, you can check this Bitrise discussion.

Thanks!

What is bitcode?

Bitcode is an intermediate representation of an app’s compiled code that allows Apple to optimize app performance and compatibility.

With Xcode 16, Apple has deprecated bitcode for all platforms, meaning that builds with bitcode enabled are no longer accepted.

Execute this command in Pods folder of your project:

xcrun bitcode_strip -r USED_FRAMEWORK.framework/USED_FRAMEWORK -o USED_FRAMEWORK.framework/USED_FRAMEWORK

Note:

Replace USED_FRAMEWORK with your own used framework name.

Example:

xcrun bitcode_strip -r Pods/FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit -o Pods/FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit

Repeat this command for your all used frameworks which are reported as “contains bitcode” in the errors/logs panel when you’re uploading app to AppStore.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật