如何部署到雪豹与ARC启用 [英] How to deploy to Snow Leopard with ARC enabled

查看:112
本文介绍了如何部署到雪豹与ARC启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个OSX应用程序,我想迁移到ARC。一切工作正常,如果我将基本SDK设置为10.7。但是当我将它设置为10.6它不工作(因为它没有找到_objc_release等)。

I have an OSX app that I would like to migrate to ARC. Everything works fine if I set the base SDK to 10.7. But when I set it to 10.6 it does not work ( because it does not find _objc_release etc.). So how do I deploy my app to 10.6 with ARC enabled?

推荐答案

您将SDK设置为10.7,但将部署目标设置为10.6 。

You set the SDK to 10.7 but the Deployment Target to 10.6.

请注意:


虽然可以使用ARC运行在Mac OS X 10.6和iOS 4上,归零弱引用在这些操作系统上不可用。所有弱引用必须在这里__unsafe_unretained。因为非零的弱引用是如此危险,这个限制显着降低ARC在这些操作系统上的吸引力在我看来。

While it's possible to build programs using ARC that run on Mac OS X 10.6 and iOS 4, zeroing weak references are not available on those OSes. All weak references must be __unsafe_unretained here. Because non-zeroing weak references are so dangerous, this limitation significantly decreases the attractiveness of ARC on those OSes in my view.

资料来源: 自动参考计数

这篇关于如何部署到雪豹与ARC启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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