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)”这种情况,可参照如下 ...
随机推荐
- Iview的小经验
1.动态控制form验证的小红星 HTML部分: <FormItem :class="{requireStar:bankFlag1}"> CSS部分: /*动态必填项c ...
- git遇到error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed failed怎么办?
答: 将clone地址中的https://替换成git://即可解决 如: 将https://git.openwrt.org/project/luci.git修改为git://git.openwrt. ...
- Redis集群 - Sentinel与RAFT算法
引入 在主从模型中讲到 一旦Master宕机失效,需要手动将Slave角色提升为Master,否则这个子集群将不可用. 这个缺陷使得系统可用性大大降低.因此Redis专门提供了一个哨兵机制来实 ...
- spring data jpa开启批量插入、批量更新
spring data jpa开启批量插入.批量更新 原文链接:https://www.cnblogs.com/blog5277/p/10661096.html 原文作者:博客园--曲高终和寡 *** ...
- 6.4 SpringData JPA的使用
引言:该文档是参考尚硅谷的关于springboot教学视屏后整理而来.当然后面还加入了一些自己从网上收集整理而来的案例! 一.SpringData JPA初步使用 1. springdata简介 2. ...
- java笔记 -- 数组
概念: 数组是一种数据结构, 用来存储同一类型值的集合. 通过一个整型的下标可以访问数组中的每一个值. 声明: int[] a(推荐,将类型int[](整形数组)和变量名分开了) 或者int a[] ...
- 人脸识别-arcface损失函数
参考博客: L-margin softmax loss:https://blog.csdn.net/u014380165/article/details/76864572 A-softmax loss ...
- 如何为Rails作贡献:例增加rich_text field generators
如何为Rails作贡献 例增加rich_text field generators 下载https://github.com/rails/rails 打开atom,在 rails/railties/l ...
- 在html后面拼接字符串后页面的跳转
我就举一个简单的栗子,主要目的是实现页面跳转时后面获取的参数 <div class="active"> 点击我可以跳转 </div> 样式就随便写一下 之后 ...
- live 2d js demo
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...