如何将Xcode项目转换为使用ARC(自动引用计数)? [英] How do I convert my Xcode project to use ARC (Automatic Reference Counting)?

查看:76
本文介绍了如何将Xcode项目转换为使用ARC(自动引用计数)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行转换为Obj-C"时,它首先运行预检查".有些文件我希望Precheck忽略,我认为我可以在这些文件上设置编译器标志-fno-objc-arc.但是Precheck阶段似乎忽略了该标志(并将其重置)...所以我真的不知道如何超越Precheck.

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.

推荐答案

预检查的第一步是列出所有文件,并在其前面加上复选框,只是取消粘贴那些您不想转换为ARC的文件,迁移工具将负责在转换过程中设置正确的编译器标志.

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.

这篇关于如何将Xcode项目转换为使用ARC(自动引用计数)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆