1) Turn off ARC for this project. This is done by setting 'Objective-C Automatic Reference Counting'to NO in the 'Build Settings' tab of your target in the project page.
2) Remove all retain
release
autorelease
NSAutoReleasePools
and retainCount
calls, since ARC makes them for you. With the exception of NSAutoReleasePool
s They have been replaced by @autorelease{}
.
转帖:http://stackoverflow.com/questions/8236797/xcode-cocoa-release-is-unavailable-error
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ARC forbids explicit message send of'release'
ARC forbids explicit message send of'release'
'release' is unavailable: not available inautomatic reference counting mode
解决办法:
打开当前工程,打开"Build Settings",找到Objective-C Automatic Reference Counting项,将它的值设置为NO。
再次编译,就消除了这个错误了。
转帖:http://blog.youkuaiyun.com/baitxaps/article/details/6951286