【问题标题】:how do i change an old project I had so it can use ARC? [duplicate]如何更改我拥有的旧项目以便它可以使用 ARC? [复制]
【发布时间】:2013-06-28 21:20:15
【问题描述】:

我在不支持 ARC 的 xcode 中启动了一个旧项目,如何将我的项目更改为使用 ARC,以及如何知道要从项目中删除什么?

【问题讨论】:

    标签: ios xcode automatic-ref-counting


    【解决方案1】:

    在 Xcode 中,编辑 => 重构 => 转换为 Objective-C ARC...并按照说明进行操作。

    【讨论】:

    • 我有一个内部有 RestKit 0.10.0 的项目,而 RestKit 给了我很多错误,是否只能将我的项目转换为 ARC 并像这样离开 RestKit 还是会抛出错误?
    • 是的,您可以混合使用 ARC 和非 ARC 代码。在目标 Build Phases 中的 Compile Sources 下,将非 ARC .m 文件上的编译器标志设置为 -fno-objc-arc
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-20
    • 2014-09-13
    • 1970-01-01
    • 1970-01-01
    • 2011-12-19
    • 1970-01-01
    相关资源
    最近更新 更多