<tfoot id='nk3aE'></tfoot>

      1. <i id='nk3aE'><tr id='nk3aE'><dt id='nk3aE'><q id='nk3aE'><span id='nk3aE'><b id='nk3aE'><form id='nk3aE'><ins id='nk3aE'></ins><ul id='nk3aE'></ul><sub id='nk3aE'></sub></form><legend id='nk3aE'></legend><bdo id='nk3aE'><pre id='nk3aE'><center id='nk3aE'></center></pre></bdo></b><th id='nk3aE'></th></span></q></dt></tr></i><div id='nk3aE'><tfoot id='nk3aE'></tfoot><dl id='nk3aE'><fieldset id='nk3aE'></fieldset></dl></div>

          <bdo id='nk3aE'></bdo><ul id='nk3aE'></ul>

        <small id='nk3aE'></small><noframes id='nk3aE'>

      2. <legend id='nk3aE'><style id='nk3aE'><dir id='nk3aE'><q id='nk3aE'></q></dir></style></legend>

      3. iOS 4 真的支持 ARC 吗?iOS 4.2 SDK 在链接时缺少与 ARC 相关的符号

        时间:2023-10-03
        <tfoot id='6FnsK'></tfoot>

          <small id='6FnsK'></small><noframes id='6FnsK'>

                <tbody id='6FnsK'></tbody>

                <legend id='6FnsK'><style id='6FnsK'><dir id='6FnsK'><q id='6FnsK'></q></dir></style></legend>

                <i id='6FnsK'><tr id='6FnsK'><dt id='6FnsK'><q id='6FnsK'><span id='6FnsK'><b id='6FnsK'><form id='6FnsK'><ins id='6FnsK'></ins><ul id='6FnsK'></ul><sub id='6FnsK'></sub></form><legend id='6FnsK'></legend><bdo id='6FnsK'><pre id='6FnsK'><center id='6FnsK'></center></pre></bdo></b><th id='6FnsK'></th></span></q></dt></tr></i><div id='6FnsK'><tfoot id='6FnsK'></tfoot><dl id='6FnsK'><fieldset id='6FnsK'></fieldset></dl></div>
                  <bdo id='6FnsK'></bdo><ul id='6FnsK'></ul>
                • 本文介绍了iOS 4 真的支持 ARC 吗?iOS 4.2 SDK 在链接时缺少与 ARC 相关的符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  自从 ARC 首次宣布它是一个编译时的东西并且将与 iOS 4 向后兼容以来,我已经阅读和听说过.我已经使用 Xcode 4.2 的自动重构成功地将我的项目重构为 ARC,以及何时针对 iOS 5.0 SDK 编译,它工作正常.但是,如果我尝试针对我的 iOS 4.2 SDK 进行编译,它会在链接时失败,缺少以下符号:

                  I've read and heard since ARC was first announced that it was a compile-time thing and would be backwards-compatible with iOS 4. I have successfully refactored my project to ARC using Xcode 4.2's automatic refactoring, and when compiled against the iOS 5.0 SDK, it works fine. However, if I try to compile against my iOS 4.2 SDK, it fails at link time, missing the following symbols:

                  • _objc_retainAutoreleaseReturnValue
                  • _objc_autoreleaseReturnValue
                  • _objc_storeStrong
                  • _objc_retain
                  • _objc_release
                  • _objc_retainAutoreleasedReturnValue

                  我查了一下,这些符号在 5.0 中存在,但在 4.2 中没有:

                  I checked, and these symbols are present in 5.0 but not 4.2:

                  iPhoneOS5.0.sdk/usr/lib $ find . -type f|xargs nm|grep -i _objc_retain$
                  00005ed0 T _objc_retain
                  000061d0 T _objc_retain
                  
                  iPhoneOS4.2.sdk/usr/lib $ find . -type f|xargs nm|grep -i _objc_retain$
                  [... *crickets* ...]
                  

                  这是否意味着苹果在撒谎?相反,我假设我很困惑并且做错了什么,但我不知道是什么.

                  Does this mean that Apple lied? I assume instead that I'm confused and doing something wrong, but I can't figure out what.

                  这是 Xcode 4.2(Build 4C199)的 GM 版本

                  This is with the GM release of Xcode 4.2 (Build 4C199)

                  推荐答案

                  iOS 4.3 及以上版本支持ARC.您需要使用 iOS 5.x SDK,但可以选择 iOS 4.3 作为部署目标.4.x 中不支持的一件事是自动弱引用归零.

                  ARC is supported on iOS 4.3 and above. You need to use the iOS 5.x SDK but can select iOS 4.3 for the Deployment Target. The one thing that is not supported in 4.x is automatic weak reference zeroing.

                  查看 Apple 的文档此处了解目标-C 功能可用性指数.

                  See Apple's documentation here for the Objective-C Feature Availability Index.

                  Xcode 4.4 和 4.5 可用于提交应用程序.

                  Xcode 4.4 and 4.5 can be used to submit apps.

                  请注意,NSDictionary 和 NSArray 下标部署回 OS X 10.6 和 iOS 4,请务必将部署目标也设置回.

                  Note that NSDictionary and NSArray subscripting deploys back to OS X 10.6 and iOS 4, be sure to set the deployment target back as well.

                  这篇关于iOS 4 真的支持 ARC 吗?iOS 4.2 SDK 在链接时缺少与 ARC 相关的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:删除 iPhone 沙箱(文档文件夹)中的所有文件? 下一篇:在 iOS4 中检测通话状态

                  相关文章

                    <legend id='W1y4V'><style id='W1y4V'><dir id='W1y4V'><q id='W1y4V'></q></dir></style></legend>

                  1. <i id='W1y4V'><tr id='W1y4V'><dt id='W1y4V'><q id='W1y4V'><span id='W1y4V'><b id='W1y4V'><form id='W1y4V'><ins id='W1y4V'></ins><ul id='W1y4V'></ul><sub id='W1y4V'></sub></form><legend id='W1y4V'></legend><bdo id='W1y4V'><pre id='W1y4V'><center id='W1y4V'></center></pre></bdo></b><th id='W1y4V'></th></span></q></dt></tr></i><div id='W1y4V'><tfoot id='W1y4V'></tfoot><dl id='W1y4V'><fieldset id='W1y4V'></fieldset></dl></div>
                      • <bdo id='W1y4V'></bdo><ul id='W1y4V'></ul>
                    1. <tfoot id='W1y4V'></tfoot>

                      <small id='W1y4V'></small><noframes id='W1y4V'>