error: 'release' is unavailable: not available in automatic reference counting,该怎么解决

时间:2020-12-21 04:22:49

编译出现错误:

'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 the
navigator (the top item in the finder-like thing on the left), then
click on your target, select "Build Settings" and turn off the option "Objective-C Automatic Reference Counting" (you
can use the search field on the upper right to search it).

单击工程名称,选择Build Settings下的Objective-c Automatic Reference Counting,将其调为No。如下图:

error: 'release' is unavailable: not available in automatic reference counting,该怎么解决