【问题标题】:ld: framework not found Crashlytics Xcode7.2.1ld:找不到框架 Crashlytics Xcode7.2.1
【发布时间】:2016-06-16 00:17:06
【问题描述】:

我使用 CocoaPods 安装了 Fabric。 我的播客文件:

platform :ios, '8.0'
use_frameworks!

target '*****' do
pod 'GoogleMaps'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'Alamofire'
pod 'Google/Analytics', '~> 1.0.0'
pod 'Fabric'
pod 'Crashlytics'
end
target '****Tests' do
end
target '****UITests' do
end

post_install do |installer|
  installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
    configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

添加运行脚本构建阶段

"${PODS_ROOT}/Fabric/run" ****

构建设置 - 启用位码 - 否

我做了清理和构建 但我有错误 ld:找不到框架 Crashlytics clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

【问题讨论】:

  • 您能检查一下Framework Search Paths 设置是什么吗?在目标的 Build Settings 中。
  • "${PODS_ROOT}/GoogleMaps/Frameworks" $(PROJECT_DIR)
  • 尝试将$(inherited) "${PODS_ROOT}/Crashlytics/iOS" "${PODS_ROOT}/Fabric/iOS" 添加到列表中?
  • 现在我有错误 ld: framework not found Alamofire。 Xcode怎么了??在此之前一切正常
  • 另外,推荐看看this。有点长,但绝对值得。

标签: swift cocoapods crashlytics


【解决方案1】:

如果您检查您的项目,您会看到一个名为Pods 的文件夹,对吗?在那里你可以找到一堆xcconfig 文件。您必须将它们链接到您的项目配置。

见下图:

去掉我告诉你添加到Framework search paths 的额外路径(对不起:P)。并像这样设置配置文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-13
    • 2016-02-09
    • 2019-04-06
    • 2017-08-16
    • 2017-01-17
    • 2019-02-16
    • 2015-07-04
    • 2018-07-02
    相关资源
    最近更新 更多