8

I am using SpriteBuilderwith Cocos2d-iphone v3.

Ever since updating to XCode 5.1 my application crashes when I use CCButton actions defined directly in SpriteBuilder. This seems to be the cause

This is most likely a cast or pointer conversion, going bad on 64 bit.

as pointed out by @birkemose at the Cocos2d forums

How can I force XCode 5.1 to compile my project in 32 bit even for my 64 bit devices?

Update: Fix by updating Cocos2d to RC4

xCode 5.1 build crashes - SpriteBuilder

Community
  • 1
  • 1
Tibor Udvari
  • 2,472
  • 2
  • 18
  • 36

1 Answers1

23

In your project's build settings, change Architectures from "Standard architectures" to "armv7, armv7s" (without the quotes).

Or as matt pointed out, you can use $(ARCHS_STANDARD_32_BIT) instead, which is arguably the better way to go. Thanks matt!

Chris Flesner
  • 428
  • 3
  • 9
  • 8
    Actually it would be better to put `$(ARCHS_STANDARD_32_BIT)` rather than hard-coding those two specific architectures. – matt Mar 12 '14 at 20:56
  • So I would have to do this in the target or the application or both? – Tibor Udvari Mar 12 '14 at 20:59
  • I get a lot of linker errors for Chipmunk if I do it in the target, and the application still crashes from `CCButton` block if only the app build settings are set like so [Imgur](http://i.imgur.com/FIetPlH.png) – Tibor Udvari Mar 12 '14 at 21:13
  • Actually it does work. But you can't force 32 bit compilation and then say that build only for current device on debug if it is a 64 bit device. – Tibor Udvari Mar 13 '14 at 20:20