Mar 9, 2011

Xcode 4 is out (Updated)

Apple has just released its new IDE - Xcode 4.
The main news here is that it is not not entirely for free as it was with Xcode 3.

Members of iOS and Mac Developer programs will get it for free, others can purchase Xcode 4 in App Store for 3.99 Euro ($ 4.99).

Well, I've been using Xcode 4 since the first developer preview and I can only say that it definitely costs more than 4 Euro ;)

Just in case you want to uninstall a previous version of Xcode and don't know how to do so:
sudo /Developer/Library/uninstall-devtools --mode=all

or in case of Xcode 4 Developer Preview:
sudo /Xcode4/Library/uninstall-devtools --mode=all


Anonymous said...


could you set the code beautifier astyle script on xcode 4?
(Like this:

Thank you
Gergely Nagy

Anar Manafov said...


unfortunately the new Xcode doesn't have a user's script menu as it was in Xcode 3.
But I have a workaround and will post it very soon ;) be patient and come back for updates.

Best of luck,

Anonymous said...

Until you find a solution to run a macro, or some external bash file, here is a simple solution:

(But you need have astyle, and sudo to copy the text file into /bin)

Make a text file, example astyle-bat

Insert these lines:
astyle --brackets=break --indent=force-tab --min-conditional-indent=0 --pad-oper --unpad-paren --add-brackets --align-pointer=type --recursive "*.m"
astyle --brackets=break --indent=force-tab --min-conditional-indent=0 --pad-oper --unpad-paren --add-brackets --align-pointer=type --recursive "*.mm"
astyle --brackets=break --indent=force-tab --min-conditional-indent=0 --pad-oper --unpad-paren --add-brackets --align-pointer=type --recursive "*.cpp"
astyle --brackets=break --indent=force-tab --min-conditional-indent=0 --pad-oper --unpad-paren --add-brackets --align-pointer=type --recursive "*.h"

Or some other astyle configuration what you want.

Copy with sudo into /bin
There is also the astyle too.
Change mode to executable.

Then if you want some directory to "astyling", open terminal, cd + drag&drop the dir name from finder window, and do:

I know it's a very ugly solution, but better like nothing.

I wait your solution, to do the same thing direct from xcode 4.

Maybe in prebuild step doing the call of astyle-bat?

Gergely Nagy

Anar Manafov said...

Sorry for the delay. Couldn't answer earlier :( there were too much work these days.

Concerning the "user script" menu missing. I think, Apple removed it, because they want us to use automator in general.

Your idea is OK. But what I really want is to control what I do, for example, what if I want to do something with a part of the text only (with the selected text)...

Also I want to to everything from within Xcode.

So, the basic idea is to have an automator workflow implemented as a bash (or python or perl) script, which takes the input from STDIN, does something with this input (astyle it, for example) and prints it out to stdout.
Set this workflow to a Service menu and that's it! When you select something you can call this "service" on it...
I am going to find some time on this week and going to write a topic, which will describe this idea.
This is at least a solution, which will work with Xcode or other editors.

oakleyses said...

louboutin pas cher, nike free, polo ralph lauren outlet online, louis vuitton, polo outlet, nike air max, longchamp pas cher, jordan shoes, ray ban sunglasses, gucci handbags, tiffany and co, jordan pas cher, cheap oakley sunglasses, louis vuitton outlet, oakley sunglasses, christian louboutin uk, nike free run, sac longchamp pas cher, nike air max, oakley sunglasses, longchamp outlet, prada outlet, kate spade outlet, longchamp outlet, louis vuitton, oakley sunglasses wholesale, polo ralph lauren, longchamp outlet, christian louboutin outlet, chanel handbags, louis vuitton outlet, tiffany jewelry, michael kors pas cher, replica watches, replica watches, ray ban sunglasses, ugg boots, burberry pas cher, tory burch outlet, nike roshe, oakley sunglasses, louis vuitton outlet, ray ban sunglasses, prada handbags, ugg boots, nike outlet, christian louboutin shoes, uggs on sale, christian louboutin

oakleyses said...

guess pas cher, north face, lululemon canada, michael kors, michael kors outlet online, true religion outlet, oakley pas cher, nike free uk, michael kors outlet, abercrombie and fitch uk, hollister uk, true religion outlet, hollister pas cher, ray ban pas cher, polo lacoste, north face uk, michael kors outlet online, coach outlet store online, ray ban uk, mulberry uk, burberry handbags, michael kors outlet, hogan outlet, nike blazer pas cher, nike air max, nike air max uk, true religion outlet, uggs outlet, coach outlet, nike air force, nike air max uk, sac hermes, uggs outlet, michael kors outlet, michael kors, michael kors outlet online, nike roshe run uk, vans pas cher, true religion jeans, replica handbags, ralph lauren uk, sac vanessa bruno, burberry outlet, nike tn, coach purses, new balance, michael kors outlet online, kate spade, timberland pas cher

oakleyses said...

hermes belt, hollister, lancel, abercrombie and fitch, chi flat iron, instyler, north face outlet, louboutin, asics running shoes, nfl jerseys, ferragamo shoes, new balance shoes, mont blanc pens, vans outlet, celine handbags, hollister clothing, mcm handbags, mac cosmetics, beats by dre, giuseppe zanotti outlet, converse outlet, nike air max, longchamp uk, oakley, reebok outlet, bottega veneta, nike air max, timberland boots, insanity workout, nike trainers uk, gucci, lululemon, baseball bats, soccer shoes, soccer jerseys, north face outlet, valentino shoes, wedding dresses, hollister, nike roshe run, vans, ray ban, babyliss, jimmy choo outlet, nike huaraches, p90x workout, ghd hair, ralph lauren, herve leger, iphone cases

oakleyses said...

ugg,uggs,uggs canada, barbour uk, moncler outlet, coach outlet, ugg,ugg australia,ugg italia, moncler, thomas sabo, canada goose, moncler outlet, links of london, canada goose outlet, juicy couture outlet, moncler uk, pandora jewelry, montre pas cher, marc jacobs, replica watches, louis vuitton, moncler, canada goose jackets, swarovski, pandora charms, canada goose outlet, toms shoes, moncler, swarovski crystal, doudoune moncler, louis vuitton, moncler, pandora jewelry, ugg, barbour, louis vuitton, hollister, canada goose outlet, karen millen uk, ugg pas cher, supra shoes, canada goose, juicy couture outlet, louis vuitton, wedding dresses, pandora uk, canada goose, ugg uk, canada goose uk, louis vuitton