如何强制 xcode 在特定文件上使用 ARC?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13392521/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to force xcode to use ARC on a specific file?
提问by Maduranga E
My project contains XMPPFramework which contains a file that has to be used with ARC. But my project is Non ARC and cannot be converted due to certain other libraries linked to it.
我的项目包含 XMPPFramework,其中包含必须与 ARC 一起使用的文件。但我的项目是非 ARC,由于链接到它的某些其他库而无法转换。
How do I force the compiler to use ARC only on a certain class ?
如何强制编译器仅在某个类上使用 ARC?
回答by justin
It is the inverse problem of this question. The difference is that you would use -fobjc-arc
instead of -fno-objc-arc
.