在非ARC项目中使用SBJson

时间:2013-10-07 12:04:56

标签: ios automatic-ref-counting sbjson

我正在使用SBJson库开发IOS应用程序。我不在我的项目中使用ARC,之前的SBJson版本也没有使用它。

但是现在SBJson使用ARC,我必须升级到最新的SBJson版本。我查看了SBJson类,我看到了:

#if !__has_feature(objc_arc)
#error "This source file must be compiled with ARC enabled!"
#endif

如何在项目中升级SBJson?

2 个答案:

答案 0 :(得分:2)

您必须使用编译器标志为项目中的特定文件启用和禁用ARC。

请在官方说明Transitioning to ARC Release Notes

中找到更多信息

答案 1 :(得分:1)

您必须标记启用了ARC的所有文件。

以下是如何执行此操作的示例:

http://www.codeography.com/images/arc-compiler-flag.png

相关问题