Trying to build react native app on ios(objective c) on RN version 0.66.4
and realm v 2.29.0
.
The podfile has the Realm version 3.17.3
When trying to build, getting the following error:
"realm::BpTreeBase::replace_root(std::__1::unique_ptr<realm::Array, std::__1::default_delete<realm::Array> >)", referenced from:
realm::Column<long long>::replace_root_array(std::__1::unique_ptr<realm::Array, std::__1::default_delete<realm::Array> >) in libRealm.a(RLMCollection.o)
realm::BpTree<long long>::EraseHandler::replace_root_by_leaf(realm::MemRef) in libRealm.a(RLMCollection.o)
realm::BpTree<long long>::EraseHandler::replace_root_by_empty_leaf() in libRealm.a(RLMCollection.o)
realm::BpTree<long long>::clear() in libRealm.a(RLMCollection.o)
realm::Column<long long>::replace_root_array(std::__1::unique_ptr<realm::Array, std::__1::default_delete<realm::Array> >) in libRealm.a(RLMOptionalBase.o)
realm::BpTree<long long>::EraseHandler::replace_root_by_leaf(realm::MemRef) in libRealm.a(RLMOptionalBase.o)
realm::BpTree<long long>::EraseHandler::replace_root_by_empty_leaf() in libRealm.a(RLMOptionalBase.o)
...
"realm::BpTreeBase::write_subtree(realm::BpTreeNode const&, unsigned long, unsigned long, unsigned long, realm::BpTreeBase::SliceHandler&, realm::_impl::OutputStream&)", referenced from:
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(RLMCollection.o)
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(RLMOptionalBase.o)
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(RLMAccessor.o)
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(sync_permission.o)
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(object_store.o)
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(partial_sync.o)
realm::BpTree<long long>::write(unsigned long, unsigned long, unsigned long, realm::_impl::OutputStream&) const in libRealm.a(results.o)
...
There are lot of other similar errors of realm.
I tried
rm -rf ~/Library/Caches/CocoaPods
pod cache clean Realm
pod deintegrate || rm -rf Pods
pod install --verbose
rm -rf ~/Library/Developer/Xcode/DerivedData
but this didn't help me.
podfile
:
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'Ajjas' do
config = use_native_modules!
use_modular_headers!
# Pods for Ajjas
pod 'Realm', '3.17.3',:modular_headers => true
pod 'Avro-C', '1.7.6'
pod 'GoogleMaps', '3.7.0'
pod 'SocketRocket', '0.5.1'
pod 'IQKeyboardManager'
pod 'FirebaseCrashlytics' # , '4.3.0'
pod 'FirebaseAnalytics' #, '6.6.2'
pod 'Fabric', '~> 1.10'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# use_flipper!()
# post_install do |installer|
# end
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
# installer.pods_project.targets.each do |target|
# if target.name == 'React'
# target.remove_from_project
# end
# end
end
end
I am not sure is this a version problem, because this was working with older react-native version(0.60.5
) (didn't give a try between 0.60.5
and 0.66.4
versions and directly jumped to 0.66.4
)
Using xcode version 13.4.1
on MacBook M1.
Any help on how to solve this problem will be much appreciated!