4
votes

My project started doing something odd. I can build and test OK, but when I archive I get:

Warning all apps should include an armv7 architecture

In Target build settings I have Architectures set as $(ARCHS_STANDARD) and Base SDK as Latest iOS with Valid Architectures set as arm64 armv7 armv7s

I googled this and found several solutions saying to go to Target>Build Settings>Build Active Architecture Only and set that to NO.

Doing that, the project will no longer build and I get:

CCDirectorIOS.h    Semantic issue   
Redefinition of '__ccContentScaleFactor' with a different type: 
'CGFloat' (aka double) vs 'float'

I'm quite a way through with this project and this is the first time I've had this problem. I've tried restoring from an earlier good backup and I get the same problem so presumably this has been caused by an Xcode update, and not by my own code.

Any suggestions?

1
Be sure to remove the arm64 slice if you're using v2.x of cocos2d-iphone as it is not compatible with 64bit builds. - LearnCocos2D
Thanks, a combination of that and changing the supported architecture to $(ARCHS_STANDARD_32_BIT) has solved the issue. - user3452012

1 Answers

5
votes

Solution is simple, Change CGFloat to float

 extern float  __ccContentScaleFactor;

Here is discussion about Cocos2d 64 bit support