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?
I was getting the same issue after upgraded to Xcode 16 and iOS 18.
You can solve this issue by following this.
Open Podfile
Search for word post_install
If post_install
not found then just directly paste the below code just before the last end
keyword
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/LogRocket/LogRocket.xcframework/ios-arm64/LogRocket.framework/LogRocket",
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/Versions/Current/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/hermes.framework/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/hermes"
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
In case you have already post_install
has been used then copy and past the below script inside that.
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/LogRocket/LogRocket.xcframework/ios-arm64/LogRocket.framework/LogRocket",
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/Versions/Current/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/hermes.framework/hermes",
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/hermes"
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
Do pod install
Run build now :)
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 YOUR_PATH/USED_FRAMEWORK -o YOUR_PATH/USED_FRAMEWORK
Notes:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With