Reputation: 1144
I using react-native-fcm
for remote push notification but it gives this error:
ld: library not found for -lFirebaseCore clang: error: linker command failed with exit code 1 (use -v to see invocation)
Pod:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'SefrTaSad' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for SefrTaSad
pod 'Firebase'
pod 'Firebase/Messaging'
end
Podfile.lock:
PODS:
- Firebase (5.5.0):
- Firebase/Core (= 5.5.0)
- Firebase/Core (5.5.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.1.0)
- Firebase/CoreOnly (5.5.0):
- FirebaseCore (= 5.1.0)
- Firebase/Messaging (5.5.0):
- Firebase/CoreOnly
- FirebaseMessaging (= 3.1.0)
- FirebaseAnalytics (5.1.0):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.2)
- GoogleAppMeasurement (~> 5.1)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseCore (5.1.0):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseInstanceID (3.2.0):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.2)
- FirebaseMessaging (3.1.0):
- FirebaseCore (~> 5.0)
- FirebaseInstanceID (~> 3.0)
- GoogleUtilities/Reachability (~> 5.2)
- Protobuf (~> 3.1)
- GoogleAppMeasurement (5.1.0):
- GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- GoogleUtilities/AppDelegateSwizzler (5.2.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (5.2.2)
- GoogleUtilities/Logger (5.2.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (5.2.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (5.2.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (5.2.2)"
- GoogleUtilities/Reachability (5.2.2):
- GoogleUtilities/Logger
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- Protobuf (3.6.1)
DEPENDENCIES:
- Firebase
- Firebase/Messaging
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseInstanceID
- FirebaseMessaging
- GoogleAppMeasurement
- GoogleUtilities
- nanopb
- Protobuf
SPEC CHECKSUMS:
Firebase: 8c957f9cb3852b519180fb378801b7eeeba4d288
FirebaseAnalytics: d4a260c114aec0d765ab5b9c404ac63de1d29381
FirebaseCore: ee4b35cf8c8e781da296cc7c15125e4608bb954d
FirebaseInstanceID: 8cd2c6cfe7b9ab65ce7e248f6da7f26f6775b9be
FirebaseMessaging: f67b3719f520ee200da0e20ce577fe2bce0c01d0
GoogleAppMeasurement: e785bdb86d3d280abc778156cec323a975f11d1d
GoogleUtilities: 06b66f9567769a7958db20a92f0128b2843e49d5
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 1eb9700044745f00181c136ef21b8ff3ad5a0fd5
PODFILE CHECKSUM: 5128fcc348aba846d880d9bb9978b4bf02c0718d
COCOAPODS: 1.5.3
project build whit react-native and I make appId, key and profile the app successfully conected to firebase console but when I want to archive it whit xcode it gives this error:
how can I solve this error ?
Upvotes: 16
Views: 17795
Reputation: 132
My case is different but maybe can help someone.
In my case, I had my application and I had a Notification Service Extension, which was the project that was getting the error.
I tried everything and nothing worked, I spend almost 4 hours trying to find a solution but with no success at all. So for no reason at all, I decided to check the iOS version defined for both, my project and the Notification Service Extention, and it was different, while my project was in version 11.0, the Extension was using 10.0.
So I put the Extension in 11.0 to match my project and voila, it worked.
Upvotes: 0
Reputation: 547
Check your Build Active Architecture Only
setting in the Build Settings
and make sure it's Yes
for the Debug
.
I was working on an old project and it was No
for both Debug
and Release
for some reason and Xcode was trying to look for an arm64 version of Firebase for a simulator build.
Upvotes: 3
Reputation: 11
Make sure that all of your ios target versions are the same as in pod file.
Upvotes: 1
Reputation: 3841
In My case,
when command pod install
,
pod install yellow warnings are showed
Use the $(inherited) flag, or
Remove the build settings from the targets.
So when xcode, project
Project => Build Settings => Library Search Paths
add $(inherited)
by non-recursive.
then problem solved.
Upvotes: 2
Reputation: 47
use in Podfile
pod 'Firebase/Core'
after this go to terminal pod update
Upvotes: 2
Reputation: 3118
Add libRNFirebase.a
to your Linked Framework and Libraries
Upvotes: 2