[Bug report] Undefined symbols for architecture x86_64 on Xcode build
See original GitHub issueGoals
We are getting several errors Undefined symbols for architecture x86_64
when try to build (play) the React Native app with Xcode for iOS.
Here I report the example of two apps, with two different versions of Realm and React Native, both with the same problem.
To solve, we need to:
cd ios
rm -rf Pods
pod install
This happens several times a day, we have not yet discovered the reason.
My guess is that this is related to branch exchange. However, when changing branches, neither React Native nor Realm versions are changed. (ios/Pods
and node_modules
are ignored on GIT)
React Native 0.62.2 and RealmJS 6.0.2
React Native 0.61.5 and RealmJS 3.6.5
Steps to Reproduce
Unfortunately, we still haven’t found a standard behavior.
As @somebody32 says here https://github.com/realm/realm-js/issues/3221#issuecomment-723875769
Looks like it is happening every time there is a change in Pods (ie adding a new or upgrading a version of any pod, not Realm). Realm is 10.0.1.
The temporal solution is to clean the build and do pod install again (no need to remove pods or node_modules folder), but I agree that it is pretty time consuming
Code Sample
Both projects are created using react-native init
, without any customization in the metro
, babel
or cocoapods
scripts.
Version of Realm and Tooling
- Realm JS SDK Version: 3.6.5 and 6.0.2
- React Native: RN 0.61.5 and 0.62.2 both with cocoapods and autolinking
- Cocoapods: 1.9.3
- Xcode: 11.7 (11E801a)
- Node: 12.16.3 with nvm
- Client OS & Version: macOS Catalina 10.15.6 (19G2021)
- Which debugger for React Native: None
Maybe related to https://github.com/realm/realm-js/issues/2271 https://github.com/realm/realm-cocoa/issues/2393
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:31 (5 by maintainers)
Looks like it is happening every time there is a change in Pods (ie adding a new or upgrading a version of any pod, not Realm). Realm is 10.0.1.
The temporal solution is to clean the build and do pod install again (no need to remove pods or node_modules folder), but I agree that it is pretty time consuming
You can add something like
to your app’s pod. See also https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios