Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumors

macrumors bot
Original poster
Apr 12, 2001
68,545
39,400



xcode_icon-150x150.jpg


In 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.

Article Link: Apple Releases Xcode 4.2
 
ARC here I come! Good riddance manual memory management (for the most part)!
 
Still downloading, but does anyone know if this still includes the 10.6 SDK?

Edit: it does.
 
Last edited:
ARC here I come! Good riddance manual memory management (for the most part)!

But can you even use that when building for lower iOS platforms?

I always thought ARC was iOS 5.0 only and thus I hadn't really looked into it.
 
It requires Lion? So if I want to continue developing, I need to buy Lion? I can't use an old version because my apps may not be compatible with iOS 5 then...
 
Whatever happened to XCode 4.2 with iOS 5.0 SDK for Snow Leopard? I thought it was available as a developer beta right through iOS 5.0 GM. I guess they decided not to flip the switch even though they've been developing it in lock-step with the Lion version.
 
But can you even use that when building for lower iOS platforms?

I always thought ARC was iOS 5.0 only and thus I hadn't really looked into it.

It works on iOS 4 as far as I know, as well as snow leopard. It still uses manual memory management underneath, it just takes the job away from the programmer.
 
It works on iOS 4 as far as I know, as well as snow leopard. It still uses manual memory management underneath, it just takes the job away from the programmer.

Cool, thanks, I'll read up on it then!

I wish they'd also make something so you could right-click on class variables and it would make the corresponding @property and @synthesize statements automatically. I think that's still the most annoying manual thing for me :) Luckily the type-ahead thing helps a lot.
 
Should I continue to download from the Dev Center or grab the App Store version?
 
Wow. Way to bog down the servers. This 4GB+ beast should have been delayed until tomorrow.

Tony
 
So will this version allow the 'developer' gestures to be enabled on the iPad 1 under iOS5 like they were in iOS4.3?
 
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.
 
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.
 
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.

Thanks for that. I've been away from iOS development for some time but recently renewed my subscription in anticipation of iOS 5.
 
It works on iOS 4 as far as I know, as well as snow leopard. It still uses manual memory management underneath, it just takes the job away from the programmer.

But can you even use that when building for lower iOS platforms?

I always thought ARC was iOS 5.0 only and thus I hadn't really looked into it.

One must be careful with ARC. From the "Transitioning to ARC Release Notes".

ARC is supported in Xcode 4.2 for Mac OS X v10.6 and v10.7 (64-bit applications) and for iOS 4 and iOS 5. Weak references are not supported in Mac OS X v10.6 and iOS 4.​

I'll leave it to you to understand that possible consequence.
 
Wow. Way to bog down the servers. This 4GB+ beast should have been delayed until tomorrow.

Tony

It's 1.80GB for me (I'm on Lion upgrading from 4.1).

One must be careful with ARC. From the "Transitioning to ARC Release Notes".

ARC is supported in Xcode 4.2 for Mac OS X v10.6 and v10.7 (64-bit applications) and for iOS 4 and iOS 5. Weak references are not supported in Mac OS X v10.6 and iOS 4.​

I'll leave it to you to understand that possible consequence.

+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.
 
Last edited:
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.