这是对官方教程的补充

To add RAC to your application:

  1. Add the ReactiveCocoa repository as a submodule of your application's repository.
    1. 首先你得有个git,给自己的工程创建一个git
    2.   
      $ git submodule add https://github.com/ReactiveCocoa/ReactiveCocoa.git external/ReactiveCocoa
      $ git add .gitmodules external/ReactiveCocoa
      $ git commit -m "Add ReactiveCocoa as a submodule"
  2. Run script/bootstrap from within the ReactiveCocoa folder.
    1.   这里需进入sh(只需在终端键入"sh")
    2. cd 到脚本所在目录,键入脚本文件名即可
  3. Drag and drop ReactiveCocoaFramework/ReactiveCocoa.xcodeproj into your application's Xcode project or workspace.
  4. On the "Build Phases" tab of your application target, add RAC to the "Link Binary With Libraries" phase.
    • On iOS, add libReactiveCocoa-iOS.a.(我没找到这个东西,于是添加了ReactiveCocoa.framework)
    • On OS X, add ReactiveCocoa.framework. RAC must also be added to any "Copy Frameworks" build phase. If you don't already have one, simply add a "Copy Files" build phase and target the "Frameworks" destination.
  5. Add "$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include" $(inherited)to the "Header Search Paths" build setting (this is only necessary for archive builds, but it has no negative effect otherwise).
  6. For iOS targets, add -ObjC to the "Other Linker Flags" build setting.
  7. If you added RAC to a project (not a workspace), you will also need to add the appropriate RAC target to the "Target Dependencies" of your application.

If you would prefer to use CocoaPods, there are some ReactiveCocoa podspecs that have been generously contributed by third parties.(系统假如已经安装了CocoaPods会很方便,但是安装cocoapod的过程中是有些坑的。教程自行谷歌。本文过程中没有使用cocoapod。)

To see a project already set up with RAC, check out C-41 or GroceryList, which are real iOS apps written using ReactiveCocoa.

在项目中添加ReactiveCocoa #安装与配置的更多相关文章

  1. 如何在VUE项目中添加ESLint

    如何在VUE项目中添加ESLint 1. 首先在项目的根目录下 新建 .eslintrc.js文件,其配置规则可以如下:(自己小整理了一份),所有的代码如下: // https://eslint.or ...

  2. VS2015 项目中 添加windows服务

    1. 在项目中添加winows服务 今天刚刚为自己的项目添加了windows服务,以服务的形式运行后台系统,为前端提供接口服务,下面说一下具体怎么为vs项目添加windows服务 2. 添加Windo ...

  3. 在SpringBoot项目中添加logback的MDC

    在SpringBoot项目中添加logback的MDC     先看下MDC是什么 Mapped Diagnostic Context,用于打LOG时跟踪一个“会话“.一个”事务“.举例,有一个web ...

  4. web项目中添加logger日志

    在项目中添加log4j.xml文件 log4j.xml文件 <?xml version="1.0" encoding="UTF-8" ?><! ...

  5. 初识quartz 并分析 项目中spring整合quartz的配置【原创+转载】

    初识quartz 并分析 项目中spring整合quartz的配置[原创+转载]2018年01月29日 12:08:07 守望dfdfdf 阅读数:114 标签: quartz 更多个人分类: 工具 ...

  6. Entity Framework 的小实例:在项目中添加一个实体类,并做插入操作

    Entity Framework 的小实例:在项目中添加一个实体类,并做插入操作 1>. 创建一个控制台程序2>. 添加一个 ADO.NET实体数据模型,选择对应的数据库与表(Studen ...

  7. 关于如何正确地在android项目中添加第三方jar包

    在android项目中添加第三方jar包虽然不是一个很复杂的问题,但是确实给很多开发者带来了不小的困扰.我自己就曾经碰到过calss not found exception.error inflati ...

  8. 给iOS项目中添加图片,并通过UIImageView引用和显示该UIImage图片

    [问题] 关于iOS/iPhone中的文件选择对话框,用于用户去选择图片等文件 过程中,问题转换为,需要给当前iOS项目中,添加一个图片. 类似于Windows开发中的资源文件,其中图片文件属于资源的 ...

  9. Intellij IDEA在maven项目中添加外部Jar包运行

    一. 问题概述 我们知道Intellij IDEA是非常好用的Java语言开发的集成环境.提供了非常多实用的功能,包括了智能代码助手.代码自动提示.代码重构.各种插件等,当然也集成了maven 正常情 ...

随机推荐

  1. Hibernate部署问题总结

    出现未知实体类(- org.hibernate.MappingException: Unknown entity),找不到cfg.xml包 (org.hibernate.internal.util.c ...

  2. 在网页中嵌入地图API

    1.登录百度地图api,地址:http://api.map.baidu.com/lbsapi/creatmap/index.html 2.设置你的地理位置 3.简单设置下地图功能.地图的宽度和高度根据 ...

  3. c#查找string数组的某一个值的索引

    string[] array = { "A","B","C","D","H"};   var ind ...

  4. JS中Array详细用法

    1.数组的创建 var name= new Array(); //创建一个数组 name[0]="zhangsan";   //给数组赋值 name[1]="lisi&q ...

  5. git 撤销commit

    如果不小心commit了一个不需要commit的文件,可以对其进行撤销. 先使用git log 查看 commit日志 commit 422bc088a7d6c5429f1d0760d008d86c5 ...

  6. 解析JSON字符串

    import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONOb ...

  7. delphi数据类型及占用的字节数 C++ 对应数据类型

    delphi byte:1个字节. int/Integer: long: long long:8字节,64位 shortInt:2字节,16位 LongInt:4字节,32位 Int64:8字节,64 ...

  8. Build OpenCV text(OCR) module on windows

    Background. AOI software needs to use the OCR feature to recognize the texts on the chips. Because o ...

  9. 微信支付之JSAPI开发第一篇-基本概念

    申请权限 具体步骤就不说了,进入微信支付商户平台进行申请认证,认证成功后在微信公众号后台会有个微信支付的菜单按钮,点击后会有如下的信息 配置 在进行微信支付开发之前,必须进行一些必要的配置,如果这些配 ...

  10. RHEL7/CentOS7中更改网卡默认名称

    1.重命名并修改网卡配置文件,将"NAME"参数更为我们熟悉的“eth*”,这里我将其改为"eth0" [root@localhost ~]# cd /etc/ ...