解决ARC forbids explicit message send of release

解决ARC forbids explicit message send of release_第1张图片
奋斗的七月

在ios中经常会遇到:ARC forbids explicit message send of 'autorelease' 或[“ARC forbids explicit message send of release”]这样的错误,特别是在引入第三方库的时候会经常遇到。

原因是项目使用了arc机制,而有些文件禁止使用而报错

解决方法

点击项目Target -> 找到"Build Settings" -> 找到"Compile Sources" -> 找到出错的类,在对应类的"Compiler Flags"中添加"-fno-objc-arc"

解决ARC forbids explicit message send of release_第2张图片
奋斗的七月

你可能感兴趣的:(解决ARC forbids explicit message send of release)