Swift 之Carthage

1. 安装

     $ brew update               //更新brew

     $ brew install carthage   //下载carthage

     $ carthage version         //查看当前carthage的版本号

2.项目中init

    $ touch Cartfile //在项目中touch该文件 (同CocoPods:pod init)

    $ open -a Xcode Cartfile (or $vim Cartfile)

在文件中编辑

github "Alamofire/Alamofire" ~> 4.4
github "onevcat/Kingfisher" ~> 3.0

注Alamfire = AFN,Kingfisher = SDWebImage,SnapKit = Mansory;

3.获得lib工程

    $ carthage update --platform iOS

posted @ 2017-10-11 23:45  古龙•历山大亚  阅读(194)  评论(0编辑  收藏  举报