<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 相关的符号

        Is ARC really supported in iOS 4? The iOS 4.2 SDK is missing ARC-related symbols at linking time(iOS 4 真的支持 ARC 吗?iOS 4.2 SDK 在链接时缺少与 ARC 相关的符号)
        <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 相关的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What values should I use for iOS boolean states?(我应该为 iOS 布尔状态使用什么值?)
                  How do I get NSJSONSerialization to output a boolean as true or false?(如何让 NSJSONSerialization 将布尔值输出为真或假?)
                  Is there any difference between bool, Boolean, and BOOL in Objective-C?(Objective-C 中的 bool、Boolean 和 BOOL 之间有什么区别吗?)
                  Set bool property of all objects in the array(设置数组中所有对象的布尔属性)
                  What is the correct way to proceed with this bool?(处理这个布尔值的正确方法是什么?)
                  In Objective-c, safe and good way to compare 2 BOOL values?(在 Objective-c 中,比较 2 个 BOOL 值的安全和好方法?)

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

                        <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>
                          <tbody id='W1y4V'></tbody>
                          • <bdo id='W1y4V'></bdo><ul id='W1y4V'></ul>
                          • <tfoot id='W1y4V'></tfoot>

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