我使用react-native-fcm
进行远程推送通知,但出现此错误:
ld:找不到用于-lFirebaseCore的库 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
吊舱:
# 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
使用本机反应构建项目 然后制作appId,键和配置文件 该应用程序已成功选择到Firebase控制台,但是当我要将其存档时,使用xcode会出现此错误:
如何解决此错误?
答案 0 :(得分:2)
检查 Build Active Architecture Only
中的 Build Settings
设置,确保 Yes
为 Debug
。
我正在开发一个旧项目,出于某种原因,它对 No
和 Debug
都是 Release
,Xcode 试图为模拟器构建寻找 arm64 版本的 Firebase .
答案 1 :(得分:1)
将libRNFirebase.a
添加到您的Linked Framework and Libraries
答案 2 :(得分:1)
在Podfile中使用
pod 'Firebase/Core'
此后转到终端吊舱更新
答案 3 :(得分:0)
就我而言,
当命令pod install
时
显示Pod安装黄色警告
使用$(继承的)标志,或
从目标中删除构建设置。
因此,当使用xcode进行项目开发时,
项目=>构建设置=>库搜索路径
通过非递归添加$(inherited)
。
然后问题解决了。
答案 4 :(得分:0)
确保所有ios目标版本都与pod文件中的相同。
答案 5 :(得分:0)
我解决了打开“ PROJECT-NAME”的问题。xcworkspace