1

I am developing a cocos2d game, I tried to converted the code to Objective c ARC, But it shows some issues in the cocos 2d library.

How can I convert a cocos2d application to Objective C ARc. Is there any new release of cocos2d which is ARC compatible,

Thanks in advance

Johnykutty
  • 11,106
  • 11
  • 55
  • 95

2 Answers2

2

Cocos2d-iphone v1.1 (beta) and 2.0 (beta) are compatible with ARC - but only if you build cocos2d-iphone into a static library. There's no official instructions or template project yet.

Tiny Tim Games has a tutorial on that, and Ray Wenderlich has an alternative solution.

And Kobold2D gives you ARC for cocos2d-iphone out of the box, plus all the nitty-gritty information about ARC that'll help you with the follow-up questions you'll have sooner than later.

LearnCocos2D
  • 64,083
  • 20
  • 128
  • 214
1

You can disable ARC on a file-by-file basis. For each element of the Cocos2D Library, apply the technique of How can I disable ARC for a single file in a project?

Community
  • 1
  • 1
Adam Wright
  • 48,266
  • 12
  • 127
  • 152