新接手的一個項(xiàng)目屠橄,想要給它添加FLEX族跛,依賴管理用的cocoapods 與carthage,我管的部分用carthage
按部就班的添加依賴锐墙,Terminal上報(bào)個error
error: unable to find utility "xcodebuild", not a developer tool or in PATH
看看什么影響吧礁哄,點(diǎn)開xcode發(fā)現(xiàn) Linked Frameworks and Libraries 里找不到FLEX.framework
正常應(yīng)該在 項(xiàng)目/Carthage/Build/iOS/ 里面找到添加的framework的
stackoverflow 找到回答 解決
就是首次用的時(shí)候會發(fā)生這種狀況,定位不到你的開發(fā)工具(Xcode) 設(shè)置一下就好了
Xcode > Preferences > Locations
鑒于每次換電腦都要stackoverflow一下這個問題(腦子啊溪北,總忘)還是記下吧
--------<我是華麗的分割線>--------
簡單說下carthage
cd到項(xiàng)目的文件夾目錄下
$ touch Cartfile
然后可以直接打開Cartfile 或者
$ vim Cartfile
編輯添加
github "xxx/xxx" ~> x.x.x
更新命令
$ carthage update --platform iOS
打開項(xiàng)目的文件夾
到這算是把依賴down好了 至于怎么加到項(xiàng)目中我看過三種
第一種是 直接把framework加到embedded binaries里
add XXXX.framework to the embedded binaries of your target, as it would otherwise be included in all builds
第二種是 添加到 Link Binary with Libraries
( What is the difference between Embedded Binaries and Linked Frameworks)
第三種 不加到 Link Binary with Libraries