![](/img/trans.png)
[英]Add custom path to HEADER_SEARCH_PATHS using CocoaPods post install hook
[英]CocoaPods Error pod install HEADER_SEARCH_PATHS
首先嘗試CocoaPods(我對此並不滿意!)。 我遵循了所有指示。 當我執行pod install
這就是我得到的:
分析依賴關系
下載依賴項
使用AFNetworking(2.4.1)
使用Braintree(3.4.0)
生成Pod項目集成客戶端項目[!]
MyProject [Debug]
目標將覆蓋Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
定義的HEADER_SEARCH_PATHS
構建設置Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
$(inherited)`標志,或者
-從目標中刪除構建設置。[!]
MyProject [Debug]
目標將覆蓋Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
OTHER_LDFLAGS
中定義的OTHER_LDFLAGS
構建設置Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
$(inherited)`標志,或者
-從目標中刪除構建設置。[!]
MyProject [Release]
目標將覆蓋Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
定義的HEADER_SEARCH_PATHS
構建設置Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
$(inherited)`標志,或者
-從目標中刪除構建設置。[!]
MyProject [Release]
目標將覆蓋Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
OTHER_LDFLAGS
中定義的OTHER_LDFLAGS
構建設置Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the
$(inherited)`標志,或者
-從目標中刪除構建設置。
這是我的Podfile:
來源' https://github.com/CocoaPods/Specs.git '
目標'ActivFocus'做
pod'Braintree'#或者:pod'Braintree','〜> 3.0.0'
pod“ AFNetworking”,“〜> 2.0”
結束
目標'ActivFocusTests'做
pod'Braintree'#或者:pod'Braintree','〜> 3.0.0'
pod“ AFNetworking”,“〜> 2.0”
結束
我不知道如何遵循建議:
- Use the '$(inherited)' flag, or - Remove the build settings from the target.
編輯:這是由於以下原因我在嘗試構建項目時收到的Xcode錯誤:
Ld /Users/randy/Library/Developer/Xcode/DerivedData/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Products/Debug-iphonesimulator/MyProject.app/MyProject normal i386 cd / Users / randy / Development / MyProject / iOSApp / MyProject export IPHONEOS_GET = TARGET導出PATH =“ / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / usr / bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / bin:/ bin: /usr/sbin:/sbin”/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator。平台/開發人員/SDK/iPhoneSimulator8.1.sdk -L /用戶/ randy /庫/開發人員/ Xcode / DerivedData / MyProject-epuhpnvywesozcamslrdbksivzae / Build / Products / Debug-iphonesimulator -L / Users / randy / Development / MyProject / iOSApp / MyProject / Pods / Braintree / Braintree / PayPal / mSDK -L / Users / randy / Development / MyProject / iOSApp / MyProject -L / Users / randy / Development / MyProject / iOSApp / MyProj ect / MyProject / libs / ios_libs / simplify / vendor / ocmock -F / Users / randy / Library / Developer / Xcode / DerivedData / MyProject-epuhpnvywesozcamslrdbksivzae / Build / Products / Debug-iphonesimulator -F / Users / randy / Development / MyProject / iOSApp / MyProject / MyProject / libs / ios_libs / simplify -F / Users / randy / Development / MyProject / iOSApp / MyProject / MyProject -F / Users / randy / Development / MyProject / iOSApp / MyProject -filelist / Users / randy / Library /開發人員/ Xcode /派生數據/MyProject-epuhpnvywesozcamslrdbksivzae/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/MyProject.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min = 7.1 -framework AVFoundation -framework CoreData -framework QuartzCore -framework MediaPlayer -framework CoreGraphics -framework UIKit -framework Foundation -lPods-MyProject -Xlinker -dependency_info -Xlinker /用戶/ randy /庫/開發人員/ Xcode / DerivedData / MyProject-epu hpnvywesozcamslrdbksivzae / Build / Intermediates / MyProject.build / Debug-iphonesimulator / MyProject.build / Objects-normal / i386 / MyProject_dependency_info.dat -o / Users / randy / Library / Developer / Xcode / DerivedData / MyProject-epuhpnvywesozcamslrdbks Debug-iphonesimulator / MyProject.app / MyProject
ld:找不到-lPods-ActivFocus clang的庫:錯誤:鏈接器
命令失敗,退出代碼為1(使用-v查看調用)
如果沒有對頭搜索路徑進行手動覆蓋,請嘗試刪除添加到項目中的pod配置文件。 可以在YourProject\\Pods
找到(而不是在pods項目中,請檢查圖像)。 嘗試再次運行pod install並檢查。
如果您已手動添加標頭路徑,則忽略警告並在搜索路徑中添加一個繼承的標記,如下所示
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.