将应用程序转换为ARC而忽略文件?

我想将我的应用程序转换为ARC,但我有一些外部的图书馆和框架,没有投诉ARC。 我知道当你使用ARC开始一个新的项目时,你可以稍后指定要忽略的文件。 但是,将现有应用程序升级到ARC时,可以这样做吗?

在XCode中,转到您的活动目标并selectBuild Phases选项卡。 在Compiler Flags列中,为每个不需要ARC的文件设置-fno-objc-arc

编辑:

另外,为了具有相反的行为,我的意思是使用在非ARC项目中使用ARC编写的文件,可以将文件标志设置为-fobjc-arc

有关于ARC的更多信息,请ARC http://clang.llvm.org/docs/AutomaticReferenceCounting.html#general

ARC may be explicitly enabled with the compiler flag -fobjc-arc. It may also be explicitly disabled with the compiler flag -fno-objc-arc. The last of these two flags appearing on the compile line "wins".

来源: http : //clang.llvm.org/docs/AutomaticReferenceCounting.html

要添加到Felipe的答案,如果你想一次添加到多个文件:

select您想要排除的所有文件formsARC

按“Enter”

popup框将显示在列表中的最后一个文件中

键入-fno-objc-arc