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
  • 12,091
  • 13
  • 59
  • 100

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.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
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,938
  • 12
  • 131
  • 152