利用CocoaPods集成ReactiveCocoa

来源:互联网 发布:艺人网络影响力排行榜 编辑:程序博客网 时间:2024/06/10 02:38

在闲暇时学习ReactiveCocoa遇到安装问题,特此记。
安装CocoaPods(略)
1.打开xcode 创建一个工程,名为ReactiveCocoaDemo

2.终端到工程路径下
cd ReactiveCocoaDemo/

3.配置依赖
vim Podfile
platform :ios,’5.0’
pod ‘ReactiveCocoa’

4.下载文件
pod install –verbose –no-repo-update

5.Xcode ->“Build Phases”–> target, 添加 RAC 到 “Link Binary With Libraries”添加libReactiveCocoa.a

6.在Header Search Paths 中添加”$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include”

7.在 “Other Linker Flags” 添加 -ObjC

8.在ReactiveCocoaDemo-Prefix.pch 将RAC的头文件加进去

#import <ReactiveCocoa/ReactiveCocoa.h>

1 0
原创粉丝点击