Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asset Validation Failures for Bitcode Containing Frameworks in Xcode 16

enter image description hereI am trying to distribute my iOS application built with Xcode 16 targeting iOS 18, but the upload to the App Store is failing due to asset validation errors related to bitcode in certain frameworks.

Error Messages:

  1. Invalid Executable: The executable 'Runner.app/Frameworks/CardinalMobile.framework' contains bitcode. (ID: 46cd66e0-569f-4b82-b196-2e2114a7cd77)
  2. Invalid Executable: The executable 'Runner.app/Frameworks/PPRiskMagnes.framework' contains bitcode. (ID: 67ec9477-c6fa-4fba-a5a3-29ebbf92d8e3)

Question: How can I resolve these asset validation errors when distributing an app that includes third-party frameworks with bitcode on iOS 18 and Xcode 16? Is there a known compatibility issue with bitcode in this environment or specific steps I should follow to troubleshoot this?

Any advice or guidance would be greatly appreciated. Thank you!

I have already tried the following without success:

  • Disabling Bitcode in the project's Build Settings.
  • Cleaning the build folder and rebuilding the project.
  • Ensuring that all frameworks are built with the same bitcode setting.
like image 355
Muhammad Shahzad Avatar asked Sep 13 '25 06:09

Muhammad Shahzad


2 Answers

I got same issue with my MoeEngage, i solve by adding some code on Podfile, maybe you can modify the framework_paths for your frameworks

post_install do |installer|
  bitcode_strip_path = `xcrun --find bitcode_strip`.chop!

  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

  framework_paths = [
    "Pods/MoEngage-iOS-SDK/Frameworks/MoEngage.xcframework/ios-arm64_armv7/MoEngage.framework/MoEngage",
    "Pods/MoEngage-iOS-SDK/Frameworks/MOAnalytics.xcframework/ios-arm64_armv7/MOAnalytics.framework/MOAnalytics",
    "Pods/MoEngage-iOS-SDK/Frameworks/MoEngageCore.xcframework/ios-arm64_armv7/MoEngageCore.framework/MoEngageCore",
    "Pods/MoEngage-iOS-SDK/Frameworks/MOMessaging.xcframework/ios-arm64_armv7/MOMessaging.framework/MOMessaging",
    "Pods/MORichNotification/Frameworks/MORichNotification.xcframework/ios-arm64_armv7/MORichNotification.framework/MORichNotification"
  ]

  framework_paths.each do |framework_relative_path|
    strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
  end
end
like image 136
Adi Faiq Avatar answered Sep 15 '25 20:09

Adi Faiq


To know the framework location, go to your pods directory in your project from the terminal. In my case i have to disable the bitcode from SkaleKit framework so I have to reach down inside SkaleKit.framework directory to find the exact path.

Once you have the exact path then go to the root directory of the pods folder and type the following command in terminal:

xcrun bitcode_strip -r SkaleKit/Frameworks/SkaleKit.framework/SkaleKit \
  -o SkaleKit/Frameworks/SkaleKit.framework/SkaleKit

If success then clean and rebuild and upload again.

enter image description here

like image 31
user1115985 Avatar answered Sep 15 '25 21:09

user1115985