skip to Main Content

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?

2

Answers


  1. 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!

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search