Objective-C Feature Availability Index

本文详细解析了 Objective-C 语言特性与所需 Xcode 和编译器版本之间的关系,以及它们在不同 OS X 和 iOS 系统上的部署兼容性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Objective-C Feature Availability Index

This article correlates features of the Objective-C language with the versions of Xcode and compiler you need to use them, and the OS versions you can use them with.

For more information about these modern Objective-C features, see Programming with Objective-C.


Feature

Tools versions

OS X deployment

iOS deployment

Automatic Reference Counting (ARC)

Xcode 4.2

(LLVM Compiler 3.0)

Requires modern runtime

Deploys back to OS X v10.7

Deploys back to iOS 5

Automatic Reference Counting without zeroing weak reference (“ARCLite”)

Xcode 4.2

(LLVM Compiler 3.0)

Requires modern runtime

Deploys back to OS X v10.6

Deploys back to iOS 4

@autoreleasepool blocks

Xcode 4.2

(LLVM Compiler 3.0)

Using ARC: Requires modern runtime and deploys back to OS X v10.6

Using MRR: All releases

Using ARC: Deploys back to iOS 4

Using MRR: All releases

Default synthesis of @property instance variables and accessor methods

Xcode 4.4

(LLVM Compiler 4.0)

Requires modern runtime

Deploys back to iOS 4

Instance variables in class extensions and @implementation block

Xcode 4.2

(LLVM Compiler 3.0)

Requires modern runtime

All iOS releases

No forward method prototypes needed in @implementation block

Xcode 4.3

(LLVM Compiler 3.1)

All releases

All iOS releases

NSNumber, NSDictionary and NSArray literals

Xcode 4.4

(LLVM Compiler 4.0)

All releases

All iOS releases

@YES and @NO literals

Xcode 4.4 and OS X 10.8 or later SDK

Xcode 4.5 and iOS 6.0 or later SDK

(LLVM Compiler 4.0)

All releases

All iOS releases

NSDictionary and NSArray subscripting

Xcode 4.4 and OS X 10.8 or later SDK

Xcode 4.5 and iOS 6.0 or later SDK

(LLVM Compiler 4.0)

Requires modern runtime

Deploys back to OS X v10.6

Deploys back to iOS 5

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值