1

I'm updating cocos 2.0 alpha to 2.0 beta by simply replacing the lib folders.

I've managed to get it building successfully, but with tons of the same warning:

ccCArray.h

Unknown warning group 'Warc-perform-Selector-leaks' ignored

What's this about? thanks!

FBryant87
  • 3,751
  • 2
  • 33
  • 56
  • if you had install the template for 2.o beta than just try importing all your source code to 2.o beta template only. – NIKHIL Dec 19 '11 at 13:46

2 Answers2

1

Just replacing the contents of the folder may not be enough, at least it's not guaranteed to work all the time.

Consider the case where a new source code file was added. It won't be added automatically to your project's target. This would cause an error.

Consider a class that was renamed from CCSomeClass to CCOtherClass and thus the corresponding source code files changed their names too. Your project's target would continue to use CCSomeClass. At best, you'll be using old code. Slightly worse, this may cause unforseeable runtime issues. At worst the code won't compile.

Consider the case where new cocos2d resource files are added, renamed or removed. Again, this can cause issues because your project isn't modified if you just replace the files.


To upgrade cocos2d in an existing project it is recommended to install the new Xcode templates, create a new project from that template, then add your source code and resource files to the new project.

If you get sick and tired of this process (I know I did after the second time) consider using Kobold2D which allows your projects to be upgraded with the click of the mouse by using its Project Upgrader tool.

LearnCocos2D
  • 63,754
  • 20
  • 125
  • 213
  • Unfortunately I did resort to this templates method, and I'm still getting the same warnings. This is no suprise as the problem seems to be in the one class ccCArray.h – FBryant87 Dec 20 '11 at 11:41
0

In the LLVM 3.0 compiler in Xcode 4.2 you can suppress the warning as follows:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
    [self.ticketTarget performSelector: self.ticketAction withObject: self];
#pragma clang diagnostic pop

check this question out

Community
  • 1
  • 1
Gabriel
  • 3,005
  • 6
  • 32
  • 44