hermes: Asset validation failed, hermes contains bitcode. XCode 16
Bug Description
When trying to upload my app to AppStore using XCode 16, I get this error
Asset validation failed (90482)
Invalid Executable. The executable '***.app/Frameworks/hermes.framework/hermes' contains bitcode. (ID: 37fb02b5-0173-4c01-8d79-88a9cf6a33d8)
I’m already disable bitcode in the Build Settings
- I have run
gradle cleanand confirmed this bug does not occur with JSC - The issue is reproducible with the latest version of React Native.
Hermes git revision (if applicable): React Native version: 0.72.4 OS: iOS Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):
Steps To Reproduce
- Enable hermes with react native 0.72.4
- Upload the app to AppStore using XCode 16
code example:
The Expected Behavior
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 25
- Comments: 31 (1 by maintainers)
Yeah same link worked for me, you can fix it by following these steps: fix
I was facing this same issue in RN version: “0.72.6”, and was able to resolve it by following this link.
After making the required changes, make sure to clean the project, derived data, install pods again and it should work.
I installed Xcode 15.4 alongside Xcode 16 and managed to build my app.
To do this, I downloaded Xcode 15.4 from https://xcodereleases.com/, unzipped the .xip file, renamed it to Xcode15_4, and moved it to the Applications folder. After launching Xcode15_4 and signing in with my account, I built and distributed the app without any issues.
Edit note: Xcode 15.4 does not run on MacOS 15
This solution helped me
this
replace with
Hi, IIRC, Apple changed their mind on bitcode and and went back and forth about it.
Unfortunately RN 0.72 is no longer supported, but if you upgrade to 0.73 or even better to 0.75, this should address your problem.
Build uploaded successfully but received this warning how to get rid of this
I am getting this issue in XCode 16 but none of the answers help me to resolve that issue
Upload failed error: Asset validation failed Invalid Executable. The executable ‘’ contains bitcode. (ID: 2aa62af7-6fed-46e2-8405-4946368da620) error: Asset validation failed Invalid Executable. The executable ‘mc.app/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit’ contains bitcode. (ID: 1581a6ec-f5d5-4946-908d-18d778fee573) error: Asset validation failed Invalid Executable. The executable ‘mc.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics’ contains bitcode. (ID: e6505282-d042-44f2-9285-995859f32aea) error: Asset validation failed Invalid Executable. The executable ‘mc.app/Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit’ contains bitcode. (ID: cb690141-2be7-422c-a6c5-2374a91bc335) error: Asset validation failed Invalid Executable. The executable ‘mc.app/Frameworks/FBSDKShareKit.framework/FBSDKShareKit’ contains bitcode. (ID: 727dc5e1-7bae-40dd-a17a-5f4d0eb4fa18)
I added the following code to the post-install section of the Podfile, and after creating a new archive, it worked fine for me.
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) endframework_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
I had the same issue, and here’s how I resolved it step by step:
Check Hermes Paths
The paths in the original code might not be correct for your setup. First, you need to find all the Hermes frameworks and their paths within your
Podsdirectory. Run the following command to find all instances of Hermes:Update Podfile
Once you have the correct paths, update the
framework_pathsarray in yourPodfileto include them. Here’s an example of how to do it:Strip Bitcode
Ensure that your Podfile includes the bitcode stripping logic:
Clean and Build
After updating the paths, clean your project folder, Then build your project again.
Create the Build
Finally, try creating the build again (e.g., using
eas buildor Xcode) and check the result.The shell script
handle_bitcode.shfrom the link did the work in my RN 0.72.5 project and Xcode 16.2.Thanks, it’s worked for me, this way completely solves the bitcode problem of hermes engine
Solution from @Drzaln helped me on RN 0.72.4. I slightly modified it to find hermes files in whatever file structure is (in case using Bitrise and can have different paths)
How can i get the path to be added inside framework paths
@Karthik-V26 I’m using this because I use Xcode Cloud
These were the libs which were causing the issues for us:
Might be helpful for someone else to see another few locations.