2

I am using the cocos2d template in Xcode.

I initially made some changes to some of the cocos2d files, to comment out class I don't use that are deprecated, and which produce warnings.

It is unlikely I am going to make any more changes to any of the cocos2d files again.

Is there a way to set my Xcode project settings to only recompile "my files", and not just the cocos2d files each time (since there won't be any changes in the cocos2d files)? Ideally, the cocos2d files should be recompiled only if there is a change.

I am using cocos2d 2.1, and Xcode 5.0.2

Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
  • The easiest way would be to include cocos2d as a static library. In Kobold2d it is done that way. Static Libraries are only recompiled when you clean the build folder. – Ben-G Feb 20 '14 at 03:51
  • 1
    xcode is smart enough not to recompile unchanged files - if you do see it compile many or all files then you changed a header that is imported by other files. The worst case scenario is having one of your headers in prefix.pch - only headers which do not normally change should be added to the prefix.pch – CodeSmile Feb 20 '14 at 07:48
  • can you explain by what you mean by having one of your headers in prefix.pch ? – Rahul Iyer Feb 20 '14 at 08:01
  • my prefix.pch has #ifdef __cplusplus #include "cocos2d.h" #endif still while archiving it recompiles cocos2d-x everytime. any solution ? – jeet.chanchawat Apr 17 '16 at 18:54

0 Answers0