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

Damn, thanks for checking

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

Related Stories

studio buds family

Beats Studio Buds Debuting Today With Active Noise Cancellation, Stemless Design, and More for $150

Monday June 14, 2021 8:00 am PDT by
We've seen a lot of teasers about the Beats Studio Buds over the past month since they first showed up in Apple's beta software updates, and today they're finally official. The Beats Studio Buds are available to order today in red, white, and black ahead of a June 24 ship date, and they're priced at $149.99. The Studio Buds are the first Beats-branded earbuds to truly compete with AirPods...
YouTube Picture in Picture Feature

YouTube Premium Subscribers Can Now Use iOS Picture-in-Picture: Here's How

Wednesday August 25, 2021 3:55 am PDT by
Google has rolled out picture-in-picture support as an "experimental" feature for YouTube premium subscribers, allowing them to watch video in a small window when the app is closed. If you're a premium YouTube subscriber looking to try out picture-in-picture, follow these steps: Launch a web browser and sign into your YouTube account at YouTube.com. Navigate to www.youtube.com/new. Scroll...
gradiente iphone white

Brazilian Electronics Company Revives Long-Running iPhone Trademark Dispute

Tuesday May 19, 2020 1:06 pm PDT by
Apple has been involved in a long-running iPhone trademark dispute in Brazil, which was revived today by IGB Electronica, a Brazilian consumer electronics company that originally registered the "iPhone" name in 2000. IGB Electronica fought a multi-year battle with Apple in an attempt to get exclusive rights to the "iPhone" trademark, but ultimately lost, and now the case has been brought to...
youtube apple tv

YouTube Discontinuing 3rd-Generation Apple TV App, AirPlay Still Available

Wednesday February 3, 2021 3:09 pm PST by
YouTube is planning to stop supporting its YouTube app on the third-generation Apple TV models, where YouTube has long been available as a channel option. A 9to5Mac reader received a message about the upcoming app discontinuation, which is set to take place in March.Starting early March, the YouTube app will no longer be available on Apple TV (3rd generation). You can still watch YouTube on...
ryanscoolios13thumbnail

Apple Releases iOS 13.1.3 With Bug Fixes for Phone, Mail, Health, and More

Tuesday October 15, 2019 10:09 am PDT by
Apple today released iOS 13.1.3 and iPadOS 13.1.3, minor updates to the iOS 13.1.2 software that was released two weeks ago. This is the fourth update to the iOS 13 operating system that came out in September. The iOS and iPadOS 13.1.3 updates are available on all eligible devices over-the-air in the Settings app. To access the updates, go to Settings > General > Software Update....
bluetti eb70 main

MacRumors Giveaway: Win a Bluetti EB70 Portable Power Station and 200W Solar Panel

Friday September 3, 2021 11:13 am PDT by
For this week's giveaway, we've teamed up with MAXOAK to offer MacRumors readers a chance to win a Bluetti portable power station and an accompanying solar panel. Bluetti makes a range of portable power station options that are useful for camping, emergencies, power outages, off-grid living, and similar situations. The Bluetti EB70 is a solid middle of the road option that offers 716Wh and...
M1X MBP Feature

Leaker: Upcoming MacBook Pro to See Price Hike Over Current Model, Equal Performance Across 14 and 16-Inch Sizes

Tuesday August 24, 2021 5:28 am PDT by
The upcoming 14-inch MacBook Pro is set to be more expensive than the current 13-inch MacBook Pro and both the 14 and 16-inch models will offer the same performance, according to the leaker known as "Dylandkt." The leaker shared the information on Twitter, explaining that both of the upcoming MacBook Pro models, expected to come in 14 and 16-inch sizes, will feature the same performance due...
iphone 13 teal with text

Apple Expecting iPhone and iPad Supply Constraints in September Quarter

Tuesday July 27, 2021 2:34 pm PDT by
During today's earnings call covering the third fiscal quarter of 2021 (second calendar quarter), Apple CFO Luca Maesteri said that Apple is expecting supply constraints to affect the iPhone and the iPad in the coming quarter. "The supply constraints that we've seen in the June quarter will be higher in the September quarter," said Maestri. The constraints will impact iPhone and iPad sales...
os x mountain lion macs 16x9 2

Apple Makes OS X Lion and Mountain Lion Free to Download

Wednesday June 30, 2021 12:19 pm PDT by
Apple recently dropped the $19.99 fee for OS X Lion and Mountain Lion, making the older Mac updates free to download, reports Macworld. Apple has kept OS X 10.7 Lion and OS X 10.8 Mountain Lion available for customers who have machines limited to the older software, but until recently, Apple was charging $19.99 to get download codes for the updates. As of last week, these updates no...
maxresdefault

Craig Federighi and Greg Joswiak Discuss iPadOS 15, macOS Monterey, Privacy, Shortcuts on Mac, and More

Saturday June 12, 2021 6:12 am PDT by
As is tradition, Apple executives Craig Federighi and Greg Joswiak joined Daring Fireball's John Gruber in an episode of The Talk Show to discuss several announcements that Apple made over this weeks WWDC, including iPadOS 15, macOS Monterey, and a large focus around privacy. Federighi kicks off the conversation discussing the common architecture, now thanks to Apple silicon, across all of...