用CocoaPods和ReactiveCocoa的安装
关于用CocoaPods安装ReactiveCocoa的问题 ?
iOS 最新版 CocoaPods 的安装流程
1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem sources -l 4.安装CocoaPods (1)$sudo gem install -n /usr/local/bin cocoapods (2)$pod setup 5.更新gem $sudo gem update --system 6.新建工程,并在终端用cd指令到文件夹内 $pod searchReactiveCocoa 7.新建文件 Podfile $vi Podfile 写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出)
platform :ios,'9.0' pod 'ReactiveCocoa' xcodeproj '/Users/zhoupengju/Downloads/ReactivePlayground-Starter/RWReactivePlayground' use_frameworks! 8.安装文件
$pod install 看到
Analyzing dependencies Downloading dependencies Installing ReactiveCocoa (4.0.1) Installing Result (1.0.2) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `RWReactivePlayground.xcworkspace` for this project from now on. 信息就说明OK了
9.安装文件
$pod update
安装过程中碰到的问题汇总:
1. [!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pods being used are: Box,ReactiveCocoa,and Result
在Prodfile中添加 use_frameworks! 就OK了
2.
修改xcodeproj '/Users/zhoupengju/Downloads/ReactivePlayground-Starter/RWReactivePlayground' 为当前工程Podfile的路径
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |