June 17, 2011
Go to Targets, click the arrow, and drag the unprocessed file from the “compile sources” folder to the “Copy Bundle Resources”
then do a “clean all targets” from the main menu and try to build again.
Since the Target node is gone in the project tree in XCode 4, you have to do the following
1. click on the project node (the blue one with the Xcode icon)
2. click on the tab labeled ‘Build Phases’
3. open the panel labeled ‘Copy Bundle Resources’
4. click the ‘+’ button at the lower left hand corner of the panel
5. add the .js file
June 17, 2011
iPhone Development, WWDC2011
I would like to share an awesome post about the introduction of iOS5 for developers. Please check it out before coding on it.
June 17, 2011
This error will appear when you compile your project with Xcode 4.2. Because of the new mechanism named ARC(Automatic Reference Counting). You could check out the document here: Programming With ARC Release Notes .
It could happen in this way:
CALayer *imageLayer = [CALayer layer];
imageLayer.contents = (id) image.CGImage;
It is pretty easy to fix this problem,
just change “id” to “objc_unretainedObject“.
Hopefully this could help you out a little bit. Enjoy coding 🙂
March 21, 2011
When i compile an old project, i got this kind of error. In case someone else was also hindered by this, check out the screenshots below.
Change the settings under “Target”:
Change Tab “Valid Architectures” from this:
to this (just add “Any iOS Simulator SDK : i386”):
March 18, 2011
This is pretty simple.
open terminal, and run mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes
and download theme file which has the extension .dvtcolortheme.
Move those files to the above folder.
Then just restart your xcode4, you should see it under Preferences -> Fonts & Colors.
Here are the themes files you could use:
- Blackboard ported from TextMate to Xcode 4 by @CocoaSamurai
- EGO and EGOv2 by Enormego.
- Stevenf‘s dark theme.
- Spacedust by Michael Hallendal.
- Twilight ported from TextMate to Xcode 3/4 by @slant.
- Morrowind ported from TextMate to Xcode 3/4 by Nate Stedman.
In addition, here is a python script and a ruby version to convert themes from Xcode 3 to Xcode 4 by mrevilme(Instructions).
March 15, 2011
Xcode 4 template was offically released. Xcode 4 template
1.run the command in terminal (before running this, please make sure you install git first “git client“).
git clone git://github.com/cocos2d/cocos2d-iphone.git
2. run these comamnds in terminal one by one
$ cd cocos2d-iphone
$ git checkout develop
$ git pull
$ ./install-templates.sh -f -u
3.Then you should see the template “cocos2d” under iOS.
any other problems about his, please refer here.
March 8, 2011
I’d like to introduce two useful tools to creat Sprite Sheet. And both tools can be run on MAC and PC.
The first one is called SWFSheet (http://bit.ly/hrwXZH). As you can see from the name, it load the SWF file and you could save it into a single Sprite Sheet file or multiple files with common formats supported(jpg, png…). That is, you could create your animation with tools which could export the file as SWF, then use this tool to get your sprite sheet. In addition, it support animation preview which you will see in your game.
The other one is called Sprite Sheet Maker (http://bit.ly/hU52x3), with it you could load multiple graphic files and arrange them in sequence you want and then save into a sprite sheet.png file. But the limitation of it is currently it just supports importing png files.