Build fails on actual iPhone but works fine on simulator
See original GitHub issue- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
Environment: OS: macOS High Sierra 10.13.5 Node: 8.11.1 Yarn: 1.5.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 3.1 AI-173.4819257
Packages: (wanted => installed) react: ^16.4.1 => 16.4.1 react-native: ^0.55.4 => 0.55.4
Description
App working fine on iOS simulator but while running on actual iOS device, it randomly starts giving lexical or preprocessor issue stating 'React/RCTBridge.h' file not found
error in random libraries
Screenshot:
but the same code and settings works perfectly fine on simulator.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Can't build to simulator on Apple Silicon
Using Xcode 12.2, the specific error is "building for iOS Simulator, but linking in object file built for iOS, file '.
Read more >Error while working on simulator, but works fine when running ...
It is the problem with the library. It is built only for the Device Specific Arch . Check this link for more details...
Read more >Build error on device, work fine on simulator with last Xcode
I'm having the same issue with iOS SDK 9.1 and 9.2. Simulator works, but it fails to run on device. Packaging for device...
Read more >ios simulator build works but real device build fails in flutter
Related Posts · Step 2: When the xcode opens, click on Runner on the top left corner of the window. · Step 3:...
Read more >Xcode 12 beta: ld error on simulator build (BUG) (#420) · Issues
But now it's an error (as you can see from the message). Btw it works fine for real iOS devices. Complete build log: ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Check that all of the libraries throwing the error have the specific build configuration you are using. Typically when I have seen this error it was due to that.
Thanks @anderskev for the suggestion, will surely look into it 😄