iosfluttertestflightios18xcode16

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:


Solution

  • 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