如何将我的Xcode项目转换为使用ARC(自动引用计数)?

时间:2022-05-24 22:49:33

When I run Convert to Obj-C it firsts runs a Precheck. Some files I want the Precheck to ignore, and I thought I could set the compiler flag -fno-objc-arc on those files. But Precheck phase seems to ignore that flag (and reset it)...so I don't really know how to get beyond Precheck.

当我运行Convert to Obj-C时,它首先运行Precheck。我希望Precheck忽略一些文件,我想我可以在这些文件上设置编译器标志-fno-objc-arc。但Precheck阶段似乎忽略了那个标志(并重置它)......所以我真的不知道如何超越Precheck。

1 个解决方案

#1


6  

The first step of the pre-check has a list of all your files with checkboxes before them, just unstick the ones you do not want to convert to ARC, the migration tool will take care of setting the correct compiler flags during the conversion.

预检的第一步有一个包含所有文件的列表,前面有复选框,只需将您不想转换为ARC的文件解压缩,迁移工具将负责在转换过程中设置正确的编译器标记。

#1


6  

The first step of the pre-check has a list of all your files with checkboxes before them, just unstick the ones you do not want to convert to ARC, the migration tool will take care of setting the correct compiler flags during the conversion.

预检的第一步有一个包含所有文件的列表,前面有复选框,只需将您不想转换为ARC的文件解压缩,迁移工具将负责在转换过程中设置正确的编译器标记。