iphone - 我的 ARC 应用程序如何在 iOS 3.x 中运行?

标签 iphone objective-c ios automatic-ref-counting

所以我刚刚发现 ARC 仅支持运行 iOS 4.0+ 的设备。

我的应用程序(在商店中)如何在运行 iOS 3.0 的设备上运行(肯定使用 ARC)?

我很困惑。

下面的解决方案:只要我不使用归零弱引用,使用 ARC 似乎仍然适用于 iOS 3.x,但 Apple 只是不保证结果。

最佳答案

ARC 主要是一个编译时特性,编译器插入适当的 release 调用。 AFAIK 只有清零弱引用需要运行时支持。因此,只要您不使用那些,您就如履薄冰,但它可以工作。

关于iphone - 我的 ARC 应用程序如何在 iOS 3.x 中运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9646607/

相关文章:

iphone - 设置 bundle 的自定义 View Controller ?

iphone - 表格单元原型(prototype) - socket 不工作

iphone - 添加计时器来计算 UIButton 按下 iPhone 的时间

ios - SwiftUI View 首选项 : overlayPreferenceValue returns nil when used on complex containers

iphone - 当触摸事件发生时禁用 UIButton 蓝色

objective-c - 确定 View 是否在 Popover View 内

ios - 检测应用程序何时最小化(iOS)

ios - 获取另一个 UIView 下的 UIView

python - Django 解析具有字典的 json 请求导致错误

iphone - 如何在全屏 OpenGL ES 应用程序上显示 iPhone/iPad 键盘