Carthage的安装使用

安装:

推荐使用 Homebrew 进行安装,简单方便,也便于维护:

brew install carthage
使用前最好brew update下。

也可以直接下载pkg文件:https://github.com/Carthage/Carthage/releases

使用:

1、添加Cartfile文件,方法和CocoaPods 中的Podfile添加一样。

接着是carthage update --use-submodules

这时可能会提示你使用的第三方插件没有添加新的DVTPlugInCompatibilityUUIDs,添加下就不会有警告了。

到这里还不算完,这点的CocoaPods不一样,需要引入Framework

在项目中引入依赖的 Framkework,只需要在对应 Target 中的 Build Setting 中的 Framework Search Path 项加入以下路径,Xcode 便会自动搜索目录下的 Framework:

$(SRCROOT)/Carthage/Build/iOS

注意只支持swift。

参考:http://www.isaced.com/post-265.html

http://qiita.com/susieyy/items/4222989485e16e7eb53e

你可能感兴趣的:(iOS)