Carthage初试

一、下载安装-两种姿势
1).下载Carthage.pkg
    https://github.com/Carthage/Carthage/releases
2).Homebrew安装
    1.brew update
    2.brew install carthage

二、开始尝试

1.vim Cartfile
目前只支持Github或者Github Enterprise中的repositories.
/******************************************************************************************
Example Cartfile:
# Require version 2.3.1 or later
github "ReactiveCocoa/ReactiveCocoa" >= 2.3.1

# Require version 1.x
github "Mantle/Mantle" ~> 1.0    # (1.0 or later, but less than 2.0)

# Require exactly version 0.4.1
github "jspahrsummers/libextobjc" == 0.4.1

# Use the latest version
github "jspahrsummers/xcconfigs"

# Use the branch
github "jspahrsummers/xcconfigs" "branch"

# Use a project from GitHub Enterprise
github "https://enterprise.local/ghe/desktop/git-error-translations"

# Use a project from any arbitrary server, on the "development" branch
git "https://enterprise.local/desktop/git-error-translations2.git" "development"

# Use a local project
git "file:///directory/to/project" "branch"
******************************************************************************************/

2.carthage update
    ...clone
    ...
    ...Downloading

3.完成后,会在更目录中生成Carthage文件夹以及Carthage.resolved文件,有点类似Cocoapods。

4.添加依赖Framework
在Build Setting中的Framework Search Path中添加:
    $(SRCROOT)/Carthage/Build/iOS
或者在General中Embedded Binaries手动添加

其他:
1.在.gitignore添加Carthage文件
    #Carthage
    Carthage
2.只支持动态库,iOS8以及iOS8以上
3.设置platform
    例如:iOS
    carthage update --platform iOS
    
 

转载于:https://my.oschina.net/CgShare/blog/681346

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值