xcode iconIn support of today's extensive list of software releases, Apple has also pushed out the final public version of Xcode 4.2, now available through Apple's developer channel and on the Mac App Store. Xcode is Apple's package of developer tools for creating both OS X and iOS applications.

What's New in Version 4.2
- Includes SDKs for Mac OS X 10.7 Lion and iOS 5
- Storyboards let you design multiple iOS screens, and define the segues among them
- Automatic Reference Counting (ARC) saves you from manually managing retain/release
- iCloud entitlements are automatically enabled for Mac and iOS apps
- OpenGL ES Debugger graphically analyzes your OpenGL scene directly within the IDE
- Apple LLVM compiler supports C++11 features and the LLVM libc++ standard library
- Older iOS Simulators and device debugging symbols are downloaded on-demand

Xcode 4.2 requires OS X Lion and is a free download on the Mac App Store.

Top Rated Comments

HiRez Avatar
183 months ago
Is this similar to Garbage Collection?

It's better than garbage collection. GC is run-time technology and can have a dramatic negative effect on performance. Furthermore, the performance cannot be relied upon to be constant (CPU usage can spike when the GC is sweeping), and since you don't know beforehand when the GC is doing its business, bugs can be harder to track down (objects may disappear at unknowable times).

ARC is a compile-time technology. It inserts retain, release, and autorelease messages just as you would, then optimizes out redundancies before the binary is built. It simply uses the same well-defined memory management rules that you would except it doesn't make mistakes as a human can. There is no run-time penalty.

The biggest disadvantage for ARC is it can't detect cyclical references like a GC can, and that's why it includes the __weak type identifier. So you need to be a little careful for those situations, but overall it's a better technology than GC, which is why GC in Xcode will be going away in favor of ARC, at some point.
Score: 2 Votes (Like | Disagree)
DESNOS Avatar
183 months ago
ARC here I come! Good riddance manual memory management (for the most part)!
Score: 2 Votes (Like | Disagree)
gnasher729 Avatar
183 months ago
+1. I <3 ARC, but weak references are critical and the existence of incompatible code is irritating. Hopefully we'll get an SDK which is fully-compatible with ARC in Apple's next OS release, at which point we could make a clean break.
Actually, there are two kinds of weak references: "Safe" weak references that change to nil when the referenced object goes away, and "Unsafe" weak references that don't change to nil automatically. Both are "weak" technically weak references. Both work as "weak" references in 10.6, but the automatic change to nil doesn't happen in 10.6. So you can't rely on that if your code should run on 10.6.


Is this similar to Garbage Collection?

It's not a delta update. A hefty installer instead... (1.68 GB if you have 4.1)
No. It is the same old retain/release/autorelease thing, except that you don't write the statements anymore, but the compiler does it for you. The effects are: 1. Your code will be correct, because the compiler doesn't forget to retain or release an item when it should. 2. Your code may become faster, because the compiler optimizes unneeded retain/release away, implements autorelease pools faster, and uses specialized code instead of Objective-C methods. 3. If you have code that is so convoluted that the compiler can't figure out when to retain/release objects then it doesn't compile and you'll have to fix it. Most likely your code was broken anyway in that case.

Compared to Garbage Collection, your memory footprint will be lower.
Score: 1 Votes (Like | Disagree)
PR. Avatar
183 months ago
just tried. seems the answer is no.

Damn, thanks for checking

*rages* :mad:
Score: 1 Votes (Like | Disagree)
kainjow Avatar
183 months ago
Should I continue to download from the Dev Center or grab the App Store version?

I'm not sure if the Lion version is available on on the dev center. I downloaded it from the App Store and it went along fine. My coworker is downloading the SL one from the dev center and it's taking forever.
Score: 1 Votes (Like | Disagree)
ethana Avatar
183 months ago
Yes, ARC with Xcode 4.2 is HUGE for developers. If you are an iOS developer, look into ARC! It will save you from so many headaches from now on.

Yes, iOS 5.0 or greater is required for your binaries to use it.
Score: 1 Votes (Like | Disagree)

Popular Stories

iOS 26

iOS 26.1 Coming Soon: New Features for Your iPhone and Release Date

Monday October 27, 2025 7:55 am PDT by
The upcoming iOS 26.1 update includes a handful of new features and changes for iPhones, including a toggle for changing the appearance of the Liquid Glass design, "slide to stop" for alarms in the Clock app, and more. Below, we outline key details about iOS 26.1. Release Date Given that Apple has yet to seed an iOS 26.1 Release Candidate, which is typically the final beta version, the...
iOS 26 Maps Glass

Apple Reportedly Moving Ahead With Ads in Maps App

Sunday October 26, 2025 6:22 am PDT by
Apple Maps could feature integrated ads as soon as next year, Bloomberg's Mark Gurman reports. In his latest "Power On" newsletter, Gurman said that Apple's plan to bring more ads to iOS is moving "gaining traction," with the Maps app being next in line. The project will apparently give restaurants and other businesses the option to pay to have their details featured more prominently in...
maxresdefault

Apple TV 4K Could Still Launch Before 2025 Ends: All the Rumored Features

Monday October 27, 2025 4:51 pm PDT by
Apple is designing an updated version of the Apple TV 4K, and rumors suggest that it could come out sometime in the next couple of months. We're not expecting a major overhaul with design changes, but even a simple chip upgrade will bring major improvements to Apple's set-top box. Subscribe to the MacRumors YouTube channel for more videos. We've rounded up all the latest Apple TV rumors. ...
iOS 26 Battery Glass Feature

iOS 26.1 Beta Liquid Glass Battery Drain Test: Tinted vs Clear Mode

Friday October 24, 2025 2:30 pm PDT by
In the fourth iOS 26.1 beta, Apple added a "Tinted" option that reduces the translucency of Liquid Glass for those who prefer a more opaque look. I saw some comments wondering whether the setting might preserve battery life, so I thought I'd do some testing. Test Settings I did four separate tests using the iPhone 17 Pro Max, and I kept the parameters as similar as possible. Here are the...
M6 MacBook Pro Feature 1

M6 MacBook Pro: Release Date, Pricing, and What to Expect

Monday October 27, 2025 9:15 am PDT by
Apple this month refreshed the 14-inch MacBook Pro base model with its new M5 chip, and higher-end 14-inch and 16-inch MacBook Pro models with M5 Pro and M5 Max chips are expected to follow in early 2026. However, these machines will represent the final update to the current design, with Apple reportedly developing a completely new version of the MacBook Pro packed with next-generation hardware...
iOS 26

iOS 26.1 Coming Soon With These 8 New Features for Your iPhone

Wednesday October 22, 2025 6:15 am PDT by
The upcoming iOS 26.1 update includes a handful of new features and changes for iPhones, including a toggle for changing the appearance of the Liquid Glass design, "slide to stop" for alarms in the Clock app, and more. iOS 26.1 is currently in beta testing. The update will likely be released in the first half of November, and it is compatible with the iPhone 11 series and newer, but some...
swift for android

Developers Can Now Make Android Apps With Apple's Swift

Sunday October 26, 2025 4:23 am PDT by
The first preview release of the Swift SDK for Android was published this week, allowing developers to build Android apps in Swift with official tooling and making it easier to share code across iOS and Android. The SDK enables Android apps to be built in Swift using officially supported tooling rather than community workarounds. In June, it was announced that Apple's Swift programming...
ios 26 digital id passport wallet

Apple Says U.S. Passport Feature on iPhone is Coming Soon

Monday October 27, 2025 7:41 am PDT by
You will "soon" be able to add a digital version of your U.S. passport to your iPhone, according to Jennifer Bailey, vice president of Apple Pay and Apple Wallet. Bailey reiterated that the feature is coming soon during her keynote at the Money20/20 USA conference in Las Vegas on Sunday. On its iOS 26 page, Apple says the delayed feature will be "coming later this year." Apple's...
iOS 26

Apple Seeds iOS 26.1, iPadOS 26.1, and macOS Tahoe 26.1 Release Candidates

Tuesday October 28, 2025 1:07 pm PDT by
Apple today provided developers and public beta testers with the release candidate versions of upcoming iOS 26.1, iPadOS 26.1, macOS Tahoe 26.1, tvOS 26.1, watchOS 26.1, and visionOS 26.1 updates for testing purposes. The RCs betas come a week after Apple released the fourth betas. The new betas can be downloaded from the Settings app on a compatible device by going to General > Software...