首页 > 解决方案 > 使用 Cocoapods 时找不到 FMDB 库

问题描述

我有一个应用程序,我在其中使用 cocoapods 下载第三方库。我有 Salesforce sdk 和 firebase。Salesforce 的 SmartStore 和 Firebase 都依赖于 FMDB。如果我删除 Firebase pod 并进行 pod 更新,则编译正常,没有任何错误。但是,如果我将 firebase 库添加到 Pod,我会得到

未找到 -lFMDB 的库

链接器命令失败,退出代码为 1(使用 -v 调用)

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

target 'App' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
use_modular_headers!

# Pods for App
source 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

 pod 'Firebase/Analytics'
 pod 'Firebase/Crashlytics'
 pod 'SalesforceSDKCore','7.3.0'
 pod 'SmartStore','7.3.0'
 pod 'SmartSync','7.3.0'
 pod 'SalesforceAnalytics','7.3.0'
 pod 'SalesforceSDKCommon','7.3.0'

end

我不确定是什么问题以及如何解决它。任何帮助深表感谢。

标签: iosxcodefirebasesalesforcecocoapods

解决方案


如果其他人有同样的问题,请从其他链接器标志中删除库。在 pod 文件中,我use_frameworks!在 pod 文件中,相信您不必在 Other Linker Flags 中提及它们。


推荐阅读