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
177 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
177 months ago
ARC here I come! Good riddance manual memory management (for the most part)!
Score: 2 Votes (Like | Disagree)
gnasher729 Avatar
177 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
177 months ago
just tried. seems the answer is no.

Damn, thanks for checking

*rages* :mad:
Score: 1 Votes (Like | Disagree)
kainjow Avatar
177 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
177 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

iPhone 17 Pro Blue Feature Tighter Crop

iPhone 17 Pro Launching Later This Year With These 13 New Features

Wednesday April 23, 2025 8:31 am PDT by
While the iPhone 17 Pro and iPhone 17 Pro Max are not expected to launch until September, there are already plenty of rumors about the devices. Below, we recap key changes rumored for the iPhone 17 Pro models as of April 2025: Aluminum frame: iPhone 17 Pro models are rumored to have an aluminum frame, whereas the iPhone 15 Pro and iPhone 16 Pro models have a titanium frame, and the iPhone ...
iPhone 17 Air Pastel Feature

iPhone 17 Air Launching Later This Year With These 16 New Features

Thursday April 24, 2025 8:24 am PDT by
While the so-called "iPhone 17 Air" is not expected to launch until September, there are already plenty of rumors about the ultra-thin device. Overall, the iPhone 17 Air sounds like a mixed bag. While the device is expected to have an impressively thin and light design, rumors indicate it will have some compromises compared to iPhone 17 Pro models, including only a single rear camera, a...
apple watch ultra yellow

What's Next for the Apple Watch Ultra 3 and Apple Watch SE 3

Friday April 25, 2025 2:44 pm PDT by
This week marks the 10th anniversary of the Apple Watch, which launched on April 24, 2015. Yesterday, we recapped features rumored for the Apple Watch Series 11, but since 2015, the Apple Watch has also branched out into the Apple Watch Ultra and the Apple Watch SE, so we thought we'd take a look at what's next for those product lines, too. 2025 Apple Watch Ultra 3 Apple didn't update the...
iphone 17 dummies sonny dickson

iPhone 17 Air Almost as Thin as Its Buttons, New Images Show

Thursday April 24, 2025 2:14 am PDT by
If you missed the video showing dummy models of Apple's all-new super thin iPhone 17 Air that's expected later this year, Sonny Dickson this morning shared some further images of the device in close alignment with the other dummy models in the iPhone 17 lineup, indicating just how thin it is likely to be in comparison. The iPhone 17 Air is expected to be around 5.5mm thick – with a thicker ...
AirPods Pro 3 Mock Feature

AirPods Pro 3 Just Months Away – Here's What We Know

Friday April 18, 2025 5:16 am PDT by
Despite being more than two years old, Apple's AirPods Pro 2 still dominate the premium wireless‑earbud space, thanks to a potent mix of top‑tier audio, class‑leading noise cancellation, and Apple's habit of delivering major new features through software updates. With AirPods Pro 3 widely expected to arrive in 2025, prospective buyers now face a familiar dilemma: snap up the proven...
ipad air magic keyboard feature

iPadOS 19 Rumored to Show Mac-Like Menu Bar When Connected to Magic Keyboard

Thursday April 24, 2025 12:09 pm PDT by
When an iPad running iPadOS 19 is connected to a Magic Keyboard, a macOS-like menu bar will appear on the screen, according to the leaker Majin Bu. This change would further blur the lines between the iPad and the Mac. Bloomberg's Mark Gurman previously claimed that iPadOS 19 will be "more like macOS," with unspecified improvements to productivity, multitasking, and app window management,...
top stories 2025 04 26

Top Stories: iPhone 17 Air Rumors, Apple Watch Turns 10, and More

Saturday April 26, 2025 6:00 am PDT by
We've known for quite some time about Apple's plans for a thinner "iPhone 17 Air" coming later this year, but wow, the latest dummy models give us our best look yet at just how thin this phone is going to be. Other Apple news and rumors this week included another iOS 18.5 beta, the 10th anniversary of the Apple Watch launch, and more management reshuffling in Apple's Siri division, so read...
Global Close Your Rings Day Pin

Apple Stores Giving Away a Limited-Edition Pin For Free Today

Thursday April 24, 2025 10:15 am PDT by
Starting today, April 24, Apple Stores around the world are giving away a special pin for free to customers who request one, while supplies last. Photo Credit: Filip Chudzinski The enamel pin's design is inspired by the Global Close Your Rings Day award in the Activity app, which Apple Watch users can receive by closing all three Activity rings today. The limited-edition pin is the physical...