2016-03-02 68 views
0

我使用CocoaPods安装了Fabric。 我Podfile:ld:框架未找到Crashlytics Xcode7.2.1

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" **** 

构建设置 - 启用位码 - NO

我做了清理并生成 但我有错误 LD:框架不发现Crashlytics clang:错误:链接器命令失败,退出代码1(使用-v查看调用)

+0

你能检查'Framework Search Paths'设置是什么吗?在目标的** Build Settings **中。 –

+0

“$ {PODS_ROOT}/GoogleMaps/Frameworks”$(PROJECT_DIR) – Roman

+2

尝试在列表中添加'$(继承)“$ {PODS_ROOT}/Crashlytics/iOS”“$ {PODS_ROOT}/Fabric/iOS”'? –

回答

1

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

见下面的图片: enter image description here

摆脱多余的路径,我告诉你添加到Framework search paths(抱歉:P)。并像这样设置配置文件。

+0

谢谢!这行得通! – Roman