I've been having a strange issue lately with react-native-maps
. When trying to compile the app via xcode, I get the following error
...
ld: 1159 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried everything so far. For example these posts first second
This is my Podfile:
platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
target "__APP_NAME__" do
react_native_path = "../node_modules/react-native"
pod "yoga", :path => "#{react_native_path}/ReactCommon/yoga"
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'RCTActionSheet',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'GoogleMaps'
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
end
end
I have also tried to use the exact same Podfile that is specified in the Readme file in the react-native-maps repository (with the same results) and also tried to remove the -ObjC
flag from Other Linker Flags
and that resulted in the app building but it crashed with Thread 1: signal SIGABRT
in main.m file when I tried to launch it.
EDIT:
I have reverted my git repo to before installing react-native-maps
re-installed all node modules and tried to re-install all pods (I ran this and rm -rf ~/.cocoapods/repos/master && pod setup && pod install
) then tried to rebuild the project in xcode and still got the same error. My Podfile
platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
target "_APP_" do
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
end
I now wonder, what went wrong with my project?