question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linking issue: building for iOS Simulator, but linking in object file built for iOS

See original GitHub issue

Goals

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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
knethcommented, Jul 15, 2021

We have been supporting Apple M1 since v10.4.1 which sorted out Xcode linker issues.

0reactions
roycechuacommented, Feb 10, 2021

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

Screen Shot 2021-02-10 at 12 08 04 PM

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found