Default install of Cocos2d in Xcode 4.2 = Xcode Errors
If you just downloaded and installed cocos2d and a bunch of errors are appearing in your very first default project, like “unknown type CCDirector”, try installing cocos2d via git using the terminal.
$ git clone git://github.com/cocos2d/cocos2d-iphone.git$ git checkout develop$ git pull$ cd cocos2d-iphone$ ./install-templates.sh -f -u
This got rid of all those fatal errors that Xcode couldn’t resolve.
If you don’t have git, well, just grab it here: