2016-03-02 57 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