2012年4月17日 星期二

iOS project 添加 Three20 支援 (XCode >= 4.0)

Three20 Screencast 指令節錄 網址: http://www.youtube.com/watch?v=-0-E-Z0fihg

Clone project:

git clone git://github.com/facebook/three20.git

Create your own project e.g. TestThree20, paralleled to the git downloads, then you have directories like this:

Documents
    |
    three20
    |
    TestThree20

Then, use one python scrip to automatically import three20 to your project:

python three20/src/scripts/ttmodule.py -p \
 TestThree20/TestThree20.xcodeproj Three20 --xcode-version=4

Now, open your project in XCode, all things were done.

2012年4月1日 星期日

How to create project with Cocos2d and ARC support

Reference from this site :
Tiny tim
Often we want to write our APP under iOS5 with ARC support. But the developers of Cocos2d are still working for transfering the framework to the ARC.
How should we do ? Disable ARC for all Cocos2d files one by one ? Tiny tim has proposed a cleaner way --- managed by sub-project. Here it is :

1. Get cocos2d sources:
    Go to https://github.com/cocos2d/cocos2d-iphone
    git://github.com/cocos2d/cocos2d-iphone.git
   
2. Checkout the gles20 branch
    git checkout gles20
3. Creating your own project with ARC enabled, by default, it is enabled by the XCode4 templates.



4. Drag and drop cocos2d-ios.xcodeproj to your project, and link cocos2d as a static library to your project.


5. Configure the user header search for YOUR PROJECT (not cocos2d-ios).



6. Configure the recursive searches.



7. Build the project. Note : If you exam "Build settings" of your project , the setting of "Objective-C Automatic Reference Counting" is "Yes". In cocos2d-ios sub-project, the same setting is "No".