views:

278

answers:

5

Hi all,

I'm one of a pair of programmers working together on iPhone / iPod applications. I'd like to upgrade to the new version of XCode (3.2) and Snow Leopard, but chances are my partner won't. Can anyone highlight any problems we might have sharing code? Are there incompatibilities between the old and new, or should we be able to share code / projects happily?

Any help / warnings would be appreciated.

A: 

Don't do it. The Xcode project files are notoriously fragile, and aren't always compatible between versions. When they make known-incompatible changes between versions, you'll get a warning opening the files on the new version. There's no such warning for 3.2 vs 3.1, but that doesn't guarantee that you won't have any problems.


I should probably clarify that I don't mean that you should never upgrade, just that you and your partner should upgrade at the same time.

Mark Bessey
A: 

I've got two machines in this situation, one of which is SL/3.2 and one Leopard/3.1. For the one project that I share between the two, it seems to work. But as Mark points out, there's no guarantee that it will work in all cases.

I have not tried this, but it may work to have you use the project file in 3.2 and your partner use a 3.1 project file. Don't check it in, only work with the source files from source control, keep your project files local. I've done this between versions of Visual Studio, which is what prompted the idea, but though it sounds good in my head I've no idea how well it would work in practice.

Another alternative is to keep two versions of Xcode on your machine (search SO or iphonedevsdk.com for the how-to). I've done that through the OS 3.0 betas, but that assumes Xcode 3.1 lives happily on a SL machine. Probably the safest one to try, as the worst would be that 3.1 won't install or run on SL.

mikestew
Thanks Mike. Both you and Mark make good points. I'll proceed with caution :)
George Sealy
A: 

Your partner should update. It's only $29! There are a lot of useful new features, and the time is about an hour total (a bit longer if you include backup, but you are both already doing regular backups anyway, RIGHT?).

I was on a mixed team with 3.2 and 3.1 for a while, and it did work - but that was one or two XCode updates ago.

You could optionally both keep different project files and each add new files as the other added them, to be really safe...

Kendall Helmstetter Gelner
There's more to an OS upgrade than just money and the time it takes to read it off the DVD. Something always breaks, and that something may or may not eat up a whole workday that one doesn't have.I'm with you, it's cheap, easy, and mostly trouble-free Bt I'm empathetic to those who don't want to screw up a working production environment.
mikestew
I understand the reluctance, I value stable production systems myself - but for any development system, the gains are large enough and the potential for issues so small (Since Snow Leopard is really an optimized Leopard with a few new frameworks) that the benefits are too compelling to ignore. If it were Tiger to Leopard, I would not be saying this.It's also of course really easy to just SuperDuper a backup dump of the whole development system drive, spend the hour on an upgrade, and if anything breaks just dump it and go back. But it's worth trying.
Kendall Helmstetter Gelner
+2  A: 

If you do decide to attempt dualing OS/Xcode environments at the very least you should set your shared Xcode project's project setting "General" tab, Project Format to "3.1" because if you upgrade the project to 3.2 the 3.1 Xcode may have problems opening it.

geowar
A: 

I agree you should upgrade, but beware, you may need to tweak your code.

I particularly noted a difference in the way NSAlert works. In 10.5 I passed a variable "window" as a parameter and that created a sheet that opened on that particular window. In 10.6 the exact same code generated a modal dialog. I then changed "window" to "[self window]" and the sheet was back.

I also have a small problem with Core Data, where it throws the warning "Failed to call designated initializer on NSManagedObject class XXX" even though this code was fully tested under 10.5.

I believe there were other smaller problems but I fixed them along with real bugs and didn't make note of them.

Rui Pacheco