当前位置: 首页 > news >正文

简单的在工程中集成RAC

cocoa pods因为墙的原因一直不好用,按rac官方的说法一直集成不成功:

最后粗爆的把RAC的源代码直接拷贝到了工程中,解决方法如下:

1、将ReactiveCocoa目录拷贝到工程中,并加入工程中。

2、ReactiveCocoa.h中mac相关的类删除。并将#import <>的方式改成 #import ""方式

3、Build Phrases中,将RACObjCRuntime.m加上flag:-fno-objc-arc。


官方的说明:


Importing ReactiveCocoa


To add RAC to your application:


Add the ReactiveCocoa repository as a submodule of your application's repository.
Run script/bootstrap from within the ReactiveCocoa folder.
Drag and drop ReactiveCocoa.xcodeproj into your application's Xcode project or workspace.
On the "Build Phases" tab of your application target, add RAC to the "Link Binary With Libraries" phase.
On iOS, add libReactiveCocoa-iOS.a.
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.
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).
For iOS targets, add -ObjC to the "Other Linker Flags" build setting.
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.


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


相关文章:

  • 10月8日培训日记
  • 聚合优于继承
  • 数据源变更时,table中更新对应cell的显示
  • Visual C# 2005 - 如何于DataGridView控件中以跨数据行方式显示数据
  • iPhone在设置中修改应用相关项,应用会重启
  • 10月9日培训日记
  • 编译蘑菇街的teamtalk
  • HTML框架代码全集
  • 同一bundle id的应用,不同证书在设备上覆盖安装会失败
  • Xcode_6.4.dmg 官方下载地址
  • 从历史学习的 8 堂架构课
  • iOS错误报告中关于崩溃地址的分析
  • 原来Windows下面也有硬链接
  • 程序员将是人类最后一个被人工智能代替的工作
  • JNDI配置原理详解
  • 《Javascript高级程序设计 (第三版)》第五章 引用类型
  • ECS应用管理最佳实践
  • Linux快速复制或删除大量小文件
  • miaov-React 最佳入门
  • pdf文件如何在线转换为jpg图片
  • scrapy学习之路4(itemloder的使用)
  • Traffic-Sign Detection and Classification in the Wild 论文笔记
  • 阿里中间件开源组件:Sentinel 0.2.0正式发布
  • 动态魔术使用DBMS_SQL
  • 基于Dubbo+ZooKeeper的分布式服务的实现
  • 紧急通知:《观止-微软》请在经管柜购买!
  • 使用前端开发工具包WijmoJS - 创建自定义DropDownTree控件(包含源代码)
  • 微信小程序开发问题汇总
  • - 语言经验 - 《c++的高性能内存管理库tcmalloc和jemalloc》
  • #define,static,const,三种常量的区别
  • (Java实习生)每日10道面试题打卡——JavaWeb篇
  • (八)Spring源码解析:Spring MVC
  • (超详细)2-YOLOV5改进-添加SimAM注意力机制
  • (二)Pytorch快速搭建神经网络模型实现气温预测回归(代码+详细注解)
  • (六)库存超卖案例实战——使用mysql分布式锁解决“超卖”问题
  • (原)本想说脏话,奈何已放下
  • (转)JAVA中的堆栈
  • (自用)learnOpenGL学习总结-高级OpenGL-抗锯齿
  • .NET 8 中引入新的 IHostedLifecycleService 接口 实现定时任务
  • .net6+aspose.words导出word并转pdf
  • .netcore 获取appsettings
  • .NET开源全面方便的第三方登录组件集合 - MrHuo.OAuth
  • @font-face 用字体画图标
  • @ResponseBody
  • [ Linux Audio 篇 ] 音频开发入门基础知识
  • [AutoSar]BSW_OS 02 Autosar OS_STACK
  • [BZOJ] 2006: [NOI2010]超级钢琴
  • [C/C++随笔] char与unsigned char区别
  • [C++]C++入门--引用
  • [C++核心编程](四):类和对象——封装
  • [CTO札记]如何测试用户接受度?
  • [C语言]编译和链接
  • [HNOI2018]排列
  • [Markdown] 02 简单应用 第二弹
  • [pdf]《软件方法》强化自测题业务建模需求分析共191页,230题