invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.64k stars 2.21k forks source link

ld: library not found for -lFirebaseCore #2342

Closed thodwris closed 5 years ago

thodwris commented 5 years ago

When building the code from Xcode I get the following error:

ld: library not found for -lFirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I faced this issue when I manually upgraded react version from 0.57.8 to 0.59.10

Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'Synesthesia' do

  inherit! :search_paths
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  pod 'React', :path => '../node_modules/react-native'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'

  pod 'react-native-keep-awake', :path => '../node_modules/react-native-keep-awake'
  pod 'RNIap', :path => '../node_modules/react-native-iap'

  pod 'Firebase/Core', '~> 5.20.1'
  pod 'Firebase/Functions', '~> 5.20.1'
  post_install do |installer|
    installer.pods_project.targets.each do |target|

      # The following is needed to ensure the "archive" step works in XCode.
      # It removes React & Yoga from the Pods project, as it is already included in the main project.
      # Without this, you'd see errors when you archive like:
      # "Multiple commands produce ... libReact.a"
      # "Multiple commands produce ... libyoga.a"

      targets_to_ignore = %w(React yoga)

      if targets_to_ignore.include? target.name
        target.remove_from_project
      end

    end
  end
end
thodwris commented 5 years ago

I resolved opening "PROJECT-NAME".xcworkspace