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".
沒有留言:
張貼留言