Hacker News new | past | comments | ask | show | jobs | submit login
Xcode 4.1 now available free from the Mac App Store (itunes.apple.com)
196 points by X-Istence on July 20, 2011 | hide | past | favorite | 106 comments



Edit: found a fix, if quitting iTunes isn't enough for the installer, you need to launch the Activity Monitor and manually kill the "iTunes Helper" process. What a pain.

This seems extremely half-baked. The App Store doesn't install Xcode, it just downloads an installer for Xcode, and ever-so-helpfully places it in LaunchPad.

After launching the installer and letting it run for many minutes, it silently popped up a window requesting that I quit iTunes for the installation to proceed. Besides being an insane request, when I do quit iTunes nothing happens. And if I double click on the iTunes name it launches iTunes. And on top of that, this request window isn't associated with the installer app, so I wouldn't even know it has anything to do with Xcode unless I'm not doing anything else on my computer.

And to top it all off, the installer has disabled all its buttons, so there's no clean way to quit it, and no way to get it to check for iTunes again.

This is about the lowest quality that I've ever seen Apple achieve; I hope that the rest of the dev chain gets more love.


In a terminal, do killall iTunesHelper. Apple did mess up, but that will get you through. If you don't know, iTunesHelper is the thing that starts iTunes when you plug in an iThing.


Interesting, I got the notice and quit iTunes same as you - I stared at the notice for a bit thinking "hmm, I did quit iTunes..." But then I got distracted doing something else and a couple minutes later I heard the ding that something finished installing (Xcode). So, for anyone else reading this, try just going to make a sandwich :)


The "please quit iTunes" thing happened to me with Xcode 4.0 on 10.6 as well. Pretty ridiculous.


The Xcode installation asks you to close iTunes because of iTuneshelper and how iTunes will sync devices (including development devices) when they're plugged in. It makes sense that Xcode asks you to quit itunes (and kills ituneshelper too) to update files. It isn't ridiculous.


It is ridiculous, because:

• asks user to perform task manually which is trivial to automate: `tell application iTunes to quit`. Apple even has sudden termination API that iTunes could use to make it safely killable most of the time.

• needs to quit iTunes in the first place. Why can't it take advantage of versioning of libraries and frameworks? Why can't it update files in place? (running application should see old version [inode] until it closes the file).

• and the usual ridicule: a music player is a critical piece of device sync and development infrastructure.


I just had the install hang at the end, hitting the close button on the window after waiting entirely too long causes its "installhelper" process to jump to 100% CPU (probably spinning on a closed pipe).

I have to agree -- the packaging on this is complete shit.


I stated back when xcode 4 was released that when 10.7 came out, they'd make it free. [1]

Just had to wait a while. Xcode 3 has been good and free to use (and still is).

[1] http://news.ycombinator.com/item?id=2311422


As did I: http://news.ycombinator.com/item?id=2307340

Of course, the part I got wrong was that it would be included "on the disc," but one could argue that it is included on the same distribution media.


I got that same part wrong (included with the media) although since it is download only for Lion at the moment, and download for Xcode close enough:

http://www.hnsearch.com/search#request/all&q=calloc+xcod...


You are not the only one that stated that ... many, including myself are on that same list.


I should have considered that I certainly wasn't the only one, and I shouldn't be so self-centered in the future. My bad.


Question to mac developers: Does Apple let you in any way develop/debug/test programs for older operating systems? If I bought a newly-released-today MacBookAir with Lion, but I want to develop software that would still run on 10.6 and 10.5 - what's the official (and unofficial) ways to do that?


Xcode can always target one or two versions back. As for testing, you have two options:

1. Buy old hardware as a dedicated testing server and run the older operating systems on different partitions

2. Run the older versions in VMWare (10.6 can do this, but I'm not positive about 10.5)

If you don't have 10.6, it's still available for free through the Mac Developer Program.


10.5 ia also available for download through the Mac dev resource subsite.


Probably worth noting that you can seamlessly boot Mac OS X from external USB storage. Just plug the drive in before booting and hold down the "option" key when you power on.


But older OSes often don't run correctly on newer hardware.


We keep an older Mac Mini around running 10.4, 10.5 (and soon to include 10.6) for support of these older systems. We've also found that our universal binary has no issues whatsoever running on Lion, which is a relief as we still prefer Xcode 3.


Is it possible to create a UB for all three architerctures at the same time? (PPC, x86 and x64)


Apple's definition of a "Universal Binary" is an executable the runs on both PPC and x86. However, it is possible to create a fat binary that runs on all three architectures at the same time.

An example of how to do it: http://ngmarley.com/blog/osx-universal-binary/


Apple uses the term "universal" in somewhat inconsistent ways. In the Get Info window, it means what you say. But in developer documentation, it tends to mean a fat binary, with PPC/x86 being the most common pair.


It is possible, however, no PPC binary is allowed in the Mac App Store, even if your binaries also include support for other platforms. This could be a problem if you use third-party binary-only libraries as you have to strip the PPC stream manually from them before you can submit your app to the Mac App Store.


That's not too big a problem. The developer tools include a tool called lipo that can easily remove unwanted architectures from fat binaries.


Only with Xcode 3. As I mentioned below, Xcode 4 does not include support for PPC. Also, there are really four architectures (i386, x86_64, ppc, ppc64), but Xcode 3.2.6 does not like compiling for ppc64.


Is that one mac mini per version or is there an easy way to set up multiple installs?


10.6 and 10.5 (server version) will happily (well, for testing, at least) run in a Virtualbox VM. The host OS have to be OS X server too but with the 99$/year you got also server license for free. Using server instead of desktop is not a significant difference if you don't start the server daemons... somewhat remembers me of NT workstation and NT server (many years ago). :)


It's quite easy to set it up to boot of an external drive; I've done that and had 10.4/10.5/10.6 all bootable off of one external drive (split into three partitions).


Create multiple partitions on the HD - 10.4, 10.5, etc.


Others have answered most of this question, but I'll add a slight addition to supporting 10.5. Since PPC is an unsupported platform, Xcode 4 does not include support for it. I end up using Xcode 3 just for PPC support for one of my projects.


Pretty sure its not the Official way, but i would just take advantage of the new Virtualization feature, and run VM's of older OS, assuming you know where to get the images in the first place


For me, Xcode 4.1 removed gcc-4.0 (needed by brew for example). If you had Xcode 3.x it's still in /Developer-old, and can be re-added with ln -s /Developer-old/usr/bin/gcc-4.0 /usr/bin/gcc-4.0.


FWIW, Homebrew only needs gcc 4.0 for a select few formula. The vast majority of them build with more modern compilers (gcc 4.2, llvm-gcc, and clang are supported; and I use a non-Apple gcc 4.6 to compile things occasionally).


I wouldn't trust that that will work; Lion provides different libraries and that gcc-4.0 is probably not compiled properly for Lion compatibility.


Are you saying that the gcc no longer ships with Xcode, or that it, for some reason, moved the gcc binary to a different directory (or both)?

If the gcc no longer comes with Xcode, how might one get gcc for OSX Lion?


They just removed GCC 4.0.

GCC 4.2.1 is avaiable as /usr/bin/gcc-4.2, and /usr/bin/gcc is actually LLVM-GCC 4.2


I just installed xcode and I no longer have any versions of gcc in /usr/bin

edit: you actually have to run the xcode installer


You just saved me another few hours of figuring out wtf was going on. Thank you.

Apple, seriously? Is this what pro's can expect from the App Store? It's half assed at best.


And it's not the same as 4.1GM! 4B103 != 4B110. Everyone, get it from the AppStore!


Requirements: Mac OS X 10.7 or later


Damn I planned to update to Lion soon, but not so soon. Seems like we'll be spending tomorrow updating, after figuring out how to get Lion on everybodys iTunes account. Give us some time apple!


You can still get the newest Xcode from developer.apple.com as usual, no? Or continue using your current one? You have all the time you need :)


Updating to Lion was seamless and super quick. It installed for me during lunch hour.


Incredibly slow download right now. The Lion onslaught must be in full effect. I pulled Lion in about 15 minutes this morning. Xcode is estimated at about an hour and a half.


Lion took me about 10 minutes to download, Xcode took about as long ...


I've had a terrible time installing things like lxml and PIL due to problems with GCC and/or caused by installing Xcode 4.x. Shouldn't this kind of stuff be pretty reliable?


It should. But if you're still having trouble, I found using this will always work for me:

sudo ARCHFLAGS="-arch i386 -arch x86_64" CC=/usr/bin/gcc-4.2 pip install


Yeah, I think I finally found that tip after trying quite a number of things.

And hooray, lxml and PIL both appear to have installed successfully on Lion + Xcode 4.1.


With or without the ARCHFLAGS tip?


Both worked for me with a sudo pip install after downloading Xcode from the MAS.


Annoyingly it won't let me download the 10.7 documentation but it lets me browse it. Oh well, guess I should just register as a dev already.


I grabbed the GM release of Xcode for 10.7 from developer.apple.com. Will installing this from the App Store cause issues?


No issues. Your version of Lion is identical to the one people are downloading from the App Store. It'll run this XCode version normally.


Glad to see it's back to free. Now I wish I didn't waste that $5...


"Waste" $5 for an toolset that could possibly make you a millionaire? Really, it's about the same price as a hammer...


Have you used Xcode 4? :)

Compared to Xcode 3, it lacks significant functionality that is quite likely to cause you problems immediately: no scripts menu, no disassembly window, no search'n'replace in selection, no remote OS X debugging, no Interface Builder plugins. Adding new functionality is nice, but if you've done without it so far, you can keep doing without it. Taking functionality away, on the other hand...

Whilst I've no doubt that Xcode 4 will eventually become better than Xcode 3 in all respects (not that Xcode 3 was all that great to start with...), at the moment it is not. So you're paying $5 for something that could easily end up worse for you than something that is free!

I think "waste" is a reasonable way of putting it. Perhaps a touch over-dramatic for my taste, but reasonable nonetheless.

(DISCLAIMER: if you don't mind what's not in Xcode 4, $5 might not seem like a waste. Unfortunately people can only argue from their own experience. This argument is made from mine. I'm sure yours was more fun, but mine is all I've got.)


xcode is a tool, and has near the same potential to make you a millionaire that a pencil does.

if you paid $5 for a pencil, to be told a few days later that the same pencil was being offered freely, would wish you had waited for the free pencil?


That makes no sense. You are unhappy that other people can get something for free now? That's self-centered. You were willing to pay the price, why does the ability of other people to now get the same thing for free change your original assessment? It doesn't seem to change anything for me.


The argument that it was only $5 is a fine one, but to argue the overall point, I'm afraid you're wrong.

Would you feel the same way if you were renting a house, and had been saving away money for years, so decided to buy it off your landlord so that you would be a homeowner rather than renting all your life. Then a week later the same landlord, who owns all the houses on the street, decides to give the houses away to the tenants. Are you seriously going to be sat there, having spent six figures on the house, and say "I was willing to pay the price, I don't care about them now being given away free"?

Even on a less extreme example, if you spend $1000 on an iPad, and the next week an iPad 2 is announced and your iPad is in shops for $500, are you seriously not going to think "fuck, wish I waited to buy it"?


Humans are irrational like that but I try to not get annoyed by those kinds of situations. It's meaningless. If anything I would be annoyed at myself for apparently picking the wrong maximum price I was walling to pay.


Remove the time component:

Would you choose to buy an item for $X or for $0?

It isn't that you perceive the item as being worth less, it's just that you could have the item AND the $X.


But that makes no sense! The time component is kinda important, you can’t just remove it.

I’m not crying over the purchase of my 64MB, 350MHz and 4GB PC in 1998 because if I were to remove the time component the price I paid for it was way, way, way too high. That’s absurd, you don’t do that.


The regret is because your purchasing decision would have been different if you had more information. In the case of "tomorrow it's free", the information is temporal (tomorrow's price) instead of spatial (the other store has a better price).

The amount of regret changes with the time span, largely because of the utility you gain in the interim, but the key is the incomplete information - if you had perfect knowledge, would you still make the same decision?

If you knew in 1998 that 10 years later, your computer would be virtually worthless, would you still have bought it? Sure. In fact, you did know the value would approach zero over time, so there's little need for regret beyond nostalgia.


I'd just take the free pencil... and use it when my current pencil runs out. What would you do with an extra copy of Xcode?


Sell it?

I am reminded of the good ol' days of selling Linux by the pound...


No. I'd be ecstatic that the pencil is now free.


I'd look at it this way, did having XCode for an extra couple of months generate $5 of value for you? If so then it was a good deal.


I bought this last week... but at £2.99 I'm not going to lose any sleep. :-)


If you know where to get a hammer for $5, I'll come with you.


Home Depot has a $3.88 Husky "stubby" hammer. My friend just got one 3 days ago.


Saving those $5 could just as possibly make him a millionaire.

Now, didn't Apple (or at least its fanboys army) said something like they couldn't legally make Xcode free to justify those 5 bucks? I'm perplexed...


The reasoning was that they couldn't release Xcode 4 free for Snow Leopard because of Apple's extremely conservative interpretation of Sarbanes-Oxley. Xcode has always been free with new OS versions. They were only charging extra if you wanted to get it for the old OS.

(An extremely low price point like $5 is generally a tip-off that Apple is just charging a nominal fee to satisfy accounting rules.)


This keeps coming up every now and then. What's the difference between Xcode and iTunes that lets them give iTunes updates for free?


The theory is iTunes facilitates the buying of items from the iTunes Store.


That's a good question, but unfortunately I'm not privy to Apple's internal workings to give you an accurate answer. The general metric seems to be "Does it add value to the core product?" This is the same reason iOS updates are free to the iPhone but not to the iPod Touch — the iPhone is viewed as a multi-year investment (and reflected as such in Apple's accounting), while the iPod Touch is a shrinkwrap product that Apple doesn't believe it can add value to without charging for it.

But the precise bar for when they feel like they need to charge is something only Apple could tell you, and maybe not even them. Like I said, their interpretation of the law is idiosyncratic.


Thinking about it further, I'd bet the distinction is that iTunes is on Windows too, so it's viewed as an independent product, while things like Xcode and FaceTime are tied to Mac OS.


This also fits with the fact that they don't charge for new major versions of Safari, which also has a Windows version.


I read something somewhere (can't remember where) that Apple is starting to spread the sale of new macs (starting with machines with Lion on them) over some longer period of time.

This would apparently set things up for providing new features (ostensibly iCloud) without having to charge small increments and still adhere to their conservative SOX interpretation.

edit: found it. http://www.appleinsider.com/articles/11/07/19/apple_to_incre...


Why not $1, if all they're doing is satisfying accounting rules by charging a nominal fee?


I don't understand why they made it $5 for a few months, and now it's back to free again. Why did they start charging in the first place? And a fairly trivial amount, at that?


No, really. Someone explain this to me.



Thanks for the try, but that didn't explain it. That was one random person's speculation.


Apple has indicated that SOX is the reason they do this nominal fee stuff in the past.

Here's one example from 2007: http://www.appleinsider.com/articles/07/01/15/apple_to_impos...

Here's another more recent, longer in-depth article: http://blog.phirephoenix.com/1463/hey-apple-stop-hiding-behi...


On the other side of the river, you'd still be paying $549.


Anyone know if this will be available though developer.apple.com?


I don't see 4.1 download available yet.


It is now.


I'm kinda hesitant to get this as they always change a lot... all those iPhone development tutorials are very specific to a certain version. It took me awhile to find out how to deploy an iPhone app for the newer Xcode.


I agree with your hesitation if you've done zero xcode 3 development. I just completed my first xcode 4 based project last night, and the instructions on Apple's site (for binary signing, and the like) have yet to be updated for xcode 4 - since the process is already complicated enough, had I not done it before with xcode 3 I would have been completely out to lunch.

With that said, if you're comfortable with xcode 3, you shouldn't have a problem switching to xcode 4.


Agreed. All my dev books are focused on XCode 3 and there are only a couple of XCode 4 books that have been printed. Which is disappointing because now my old books are useless and I spend most of my time replaying the Apple XCode 4 videos to figure out how to do certain things.


iOS developer here. 3.0->4.0 is the biggest jump in product history. 4.1 is just a bugfix / Lion support / couple of new widgets release.

It doesn't appear (warning: no release notes yet) that 4.1 runs on SL or that 4.0 runs on Lion, so run the version appropriate to your OS.


Just install both alongside each other.


Really great of Apple to make it require Lion. Release new OS product, shove it down devs throats.


Versions of Xcode have always been tied to versions of OS X. They actually did release Xcode 4 for Snow Leopard, which is more than they've done with any previous version, so complaining now of all times seems pretty odd.


Xcode 4 was in the spring and I'm pretty sure we saw this due to releases of iOS along with iOS 5 beta.

Apple can't only tie Xcode releases to versions of OS X anymore, there's iOS they have to think about.


iOS 4 SDK came with a version of Xcode 3, and iOS 5 comes with its own version of Xcode, neither 4.0 nor 4.1 — so it's not inherently tied to the normal Mac Xcode at all. iOS might have had something do to with the early release of Xcode 4, but releasing it for general consumption was a different matter. At any rate, this is not a regressive move for Apple.


I want my 5 bucks back :-|


I'll buy you a coffee...


I'm very sceptical of this Mac App Store. As much as I like the idea (apt anyone? :-D) I am very disappointed by it's performance. Neither on SL nor on Lion does it let me update bought apps. Doing the "drag app to trash, click `install', empty trash" mumbo is not really my idea of "working".

If anyone has similar issues, or a fix, that would truly be great!


MAS always updates my purchased apps. I have however heard of it declining to do so if you have, on some attached hard drive, a newer or same-version binary or installer. But have had no problems with MAS myself. YMMV.


Why the downvotes? And no, clicking "update" did /not/ work!

Found the solution: This happens if you have "Macintosh HD" listed under the privacy tab of Spotlight's System Preferences.



Thank you. Good idea; reported.


There is an obscure button in the App Store called Updates that will update purchased apps.


  XCode 4 requires
    $99/year Mac Developer Program
    ($99/year iOS Developer Program)
    $29.99 Mac OS X Lion "upgrade" download requires
         App Store Account
         Mac OS X Snow Leopard


XCode 4 requires: OS X Lion, which requires: OS X Snow Leopard AppStore Account Upgrade fee

I haven't paid any developer program fees, and I have xCode 4.1 installed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: