美文网首页
ReactiveCocoa的使用(一):CocoaPods 之导

ReactiveCocoa的使用(一):CocoaPods 之导

作者: 一铭_ | 来源:发表于2015-12-20 21:42 被阅读869次

1.创建带有 CocoaPods的文件,首先创建一个 RacTest的工程,接下来在终端输入

cd /Users/sfm/desktop/RacTest
touch Podfile
vim Podfile

接下来,要到刚刚创建的 Podfile 中写入 rac

//rac 最低要求 ios8 
platform :ios, '9.0'

pod "ReactiveCocoa", "~>4.0.4-alpha-4"
use_frameworks!

//按下 esc ,:wq 保存退出

一旦你保存这个文件,返回到终端窗口并发出以下命令:

pod install

应该看到一个类似于下面的输出结果:

Analyzing dependencies

Downloading dependencies

Installing ReactiveCocoa (4.0.4-alpha-4)

Generating Pods project

Integrating client project

[!] From now on use RWReactivePlayground.xcworkspace.

This indicates that the ReactiveCocoa framework has been downloaded, and CocoaPods has created an Xcode workspace to integrate the framework into your existing application.

这表明 ReactiveCocoa 框架已经被下载,和 CocoaPods 已经创建了一个集成这个框架到你现有应用程序的 Xcode 工作区。

相关文章

网友评论

      本文标题:ReactiveCocoa的使用(一):CocoaPods 之导

      本文链接:https://www.haomeiwen.com/subject/llrmhttx.html