关于用CocoaPods安装ReactiveCocoa的问题 ?
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
- Could not automatically select an Xcode project. Specify one in your Podfile like so:
- xcodeproj 'path/to/Project.xcodeproj'