Linking issue: building for iOS Simulator, but linking in object file built for iOS
See original GitHub issueGoals
I’m trying to build a react native app with realm.
Expected Results
I expect it to build.
Actual Results
The build fails when linking the arm64 version with this error: In /path/to/app/node_modules/realm/vendor/realm-ios/librealm-ios.a(placeholder.o), building for iOS Simulator, but linking in object file built for iOS, file ‘/path/to/app/node_modules/realm/vendor/realm-ios/librealm-ios.a’ for architecture arm64
Version of Realm and Tooling
- Realm JS SDK Version: 10.0.1 or 6.0.4
- Node or React Native: react-native 0.63.2
- Client OS & Version: macOS 10.15.4
- Which debugger for React Native: ?/None
- CocoaPods 1.10.0
- Xcode 12.0.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Xcode building for iOS Simulator, but linking in an object file ...
1.Add arm64 to Build settings -> Exclude Architecture in all the targets.
Read more >ld: building for iOS Simulator, but linking in dylib built for iOS
Hi, I'm trying to compile the app with Xcode version 12.0 beta 6 on a simulator with iOS 14.0 and then I get...
Read more >Xcode 12, building for iOS Simulator, but linking in object file ...
Solution for Project Target · Open your project in Xcode 12 and click on the targets · Navigate to Build Settings of your...
Read more >building for iOS Simulator-arm64 but attempting to link with file ...
[google_sign_in]IOS build fails with error: building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64 ...
Read more >Build for running on iOS Simulator fails on Apple Silicon Mac
building for iOS Simulator, but linking in object file built for iOS, ... The same issue used to occur with Firebase iOS SDK...
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
We have been supporting Apple M1 since v10.4.1 which sorted out Xcode linker issues.
I am also encountering this issue @havi-b but I found this temporary workaround on Stackoverflow (https://stackoverflow.com/a/65399525) and it worked for me. What he did was mainly clean the build then exclude the arm64 architecture in the build settings for debug and release like I did below
This is only for the simulator by the way. It will work fine on physical devices like my iPhone on iOS 14.
realm js 6.0.2, Node v15.5.0 Xcode 12.4 CocoaPods 1.10.1 macOS 10.15.7