将应用程序转换为ARC而忽略文件? [英] Convert App to ARC while ignoring files?

查看:82
本文介绍了将应用程序转换为ARC而忽略文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的应用程序转换为ARC,但我有一些不受ARC抱怨的外部库和框架。我知道当你使用ARC开始一个新项目时,你可以稍后指定要忽略的文件。但是,在将现有应用升级到ARC时可以执行此操作吗?

I want to convert my app to ARC but I have some external librarys and frameworks that are not complaint with ARC. I know when yous start a new project using ARC, you can later specify which files to ignore. But can you do this when upgrading an existing app to ARC?

推荐答案

在XCode中,转到您的活动目标并选择 Build Phases 标签。在编译器标志列中,为您不希望ARC的每个文件设置 -fno-objc-arc

in XCode, go to your active target and select the Build Phases tab. In the Compiler Flags column, set -fno-objc-arc for each of the files you don't want ARC

编辑:

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

Also, to have the opposite behavior, I mean to use a file that was written using ARC inside a non ARC project, you can set the file flag to -fobjc-arc instead

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

There is plenty of more info regarding ARC here: http://clang.llvm.org/docs/AutomaticReferenceCounting.html#general

这篇关于将应用程序转换为ARC而忽略文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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