Carthage使用

# carthage 包管理


## 安装过程


1) 安装homebrew

``` ruby
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

2) 升级homebrew

``` ruby
$ brew update
```

3) 使用brew来安装 Carthage

``` ruby
brew install Carthage
```

4)查看版本

```
Carthage version
```

#### 参考资料
[Carthage 源码](https://github.com/Carthage/Carthage)

[IOS Carthage安装、使用](https://www.jianshu.com/p/1df1e03993ee)

[【iOS 开发】利用 Carthage 将项目打包 Framework 并依赖 CocoaPods 第三方库的方法](https://www.jianshu.com/p/6e5491b72bad)


## 打包三方库为framework


## 给现有的工程打包

1、'iterm' 终端cd 指定的工程下面(.xcode 或者.xcodeworkspace 同级目录);然后执行下面语句

 

``` ruby
carthage build --no-skip-current

```

如果出现以下异常:

``` ruby
Dependency "RokidToolsKit" has no shared framework schemes

//则需要设置 xcode managerscheme 中 工程share 勾选选中( 默认是打开,但是我们还要先关闭然后重新打开)
```


## 手动集成framework

手动集成需要点击 工程中Target -> General EmbeddeBinaries 。 然后选中 Copy IF need

转载于:https://www.cnblogs.com/kingbo/p/11188920.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值