error: 'retain' is unavailable: not available in automatic reference counting. 解决办法
报错原因是 项目使用的是ARC,但是有非ARC代码。 项目中要混合使用ARC和非ARC。
解决:
- target -> Build Phases -> Compile Sources
- 双击报错的 *.m 文件
- 在窗口中输入-fno-objc-arc
如果使用的非 ARC ,则为 ARC 的代码加入 -fobjc-arc
如果使用的是 ARC ,则为非 ARC 代码加入 -fno-objc-arc
判断项目是否用的ARC:

error: 'retain' is unavailable: not available in automatic reference counting. 解决办法的更多相关文章
- error: 'release' is unavailable: not available in automatic reference counting,该怎么解决
编译出现错误: 'release' is unavailable: not available in automatic reference counting mode.. 解决办法: You nee ...
- [转]error: 'retainCount' is unavailable: not available in automatic reference counting mode
转载地址:http://choijing.iteye.com/blog/1860761 后来发现是编译选项的问题: 1.点击工程名 打开编译选项 2.在编译选项中,选择Bulid Settin ...
- [转]关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的解决方法
转载地址:http://blog.csdn.net/xbl1986/article/details/7216668 Xcode是Version 4.2 Build 4D151a 根据Objective ...
- 错误解决:release' is unavailable: not available in automatic reference counting mode
解决办法: You need to turn off Automatic Reference Counting. You do this by clicking on your project in ...
- not available in automatic reference counting mode
UncaughtExceptionHandler.m:156:47: 'autorelease' is unavailable: not available in automatic referenc ...
- ARC(Automatic Reference Counting )技术概述
此文章由Tom翻译,首发于csdn的blog 转自:http://blog.csdn.net/nicktang/article/details/6792972 Automatic Reference ...
- xcode禁用ARC(Automatic Reference Counting)
Automatic Reference Counting,自动引用计数,即ARC,可以说是WWDC2011和iOS5所引入的最大的变革和最激动人心的变化.ARC是新的LLVM 3.0编译器的一项特性, ...
- JSONKit does not support Objective-C Automatic Reference Counting(ARC) / ARC forbids Objective-C objects in struct
当我们在使用JSONKit处理数据时,直接将文件拉进项目往往会报这两个错“JSONKit does not support Objective-C Automatic Reference Coun ...
- iOS开发 JSonKit does not support Objective-C Automatic Reference Counting(ARC)
有使用JSonKit的朋友,如果遇到“JSonKit does not support Objective-C Automatic Reference Counting(ARC)”这种情况,可参照如下 ...
随机推荐
- Pycharm在运行过程中,查看每个变量的方法(show variables)跟终端一样显示变量
点击运行栏的这个灰色向下剪头: 在出现的窗口上,勾选上: 点击OK,重启Pycharm:接着点击Run窗口: 将Run的show variables图标勾选: 然后你就会发现,在右边出现了变量的窗口:
- Vue-admin工作整理(十五):Ajax-跨域问题
跨域的定义: 解决方法: 1.前端通过配置来解决跨域问题:自定义的vue.config.js配置文件来进行跨域处理:就是只要存在跨域现象 都会代理到一个指定的地址上 devServer: { prox ...
- JAVA-重载(overload)和重写(overrite)
1.重载发生在同一个类中.有多个方法名相同,但是参数列表不同(包括参数个数和参数类型),和返回值无关,权限修饰符也无关. 2.重写(即覆盖)发生在子类和父类中.子类和父类的方法名.参数列表相同:子类的 ...
- c代码写数据到二进制的bin文件中
需要将数据写入到bin文件中,打开该文件是一堆乱码,增加数据的保密性 例如:要写入的数据为一个字符串,加上若干个int型整数 #define _CRT_SECURE_NO_WARNINGS #incl ...
- rsyslog+loganalyzer配置
1.loganalyzer服务器搭建[root@localhost ~]# getenforce #查看selinux是否关闭[root@localhost ~]# setenforce 0 #临时关 ...
- 【转】所有版本chrome、chromedriver、firefox下载链接
所有版本chrome.chromedriver.firefox下载链接 1. 所有版本chrome下载 是不是很难找到老版本的chrome?博主收集了几个下载chrome老版本的网站,其中哪个下载的是 ...
- jemter分布式部署及linux下分布式脚本执行
jmeter进行接口性能测试,占用内存较大,在模拟千万计并发用户时,使用分布式部署进行分压测试. 操作步骤:选择一台机器作为调度机,其他机器作为执行机 一.jmeter分布式部署 前提条件:A.执行机 ...
- python爬虫-入门-了解爬虫
作为一个爬虫新手,我觉得首先要了解爬虫是的作用以及应用. 作用:通过爬虫获取网页内的信息.包括:标题(title)图片(image)链接(url)等等 应用:抽取所需信息,进行数据汇总及分析(从事网页 ...
- nodeJs安装Vue-cli
1,安装nodejs安装包,注意安装的路径 2,安装完成node,node有自带的npm,可以直接在cmd中,找到nodeJs安装的路径下,进行命令行全局安装vue-cli.(npm install ...
- zzw原创_非root用户下安装nginx
想自己安装nginx,又不相用到root用户. 非root用户下(本文为用户bdctool)来ngnix安装,要依赖pcre库.zlib库等, 1. 下载依赖包:下载地址 pcre(www.pcre. ...