Search code examples
iphonecocos2d-xxcode7.3

Xcode 7.3 + Cocos2dx : Crash on Sprite Creation


In Xcode 7.3 Cocos2dx returns null texture. Crashed for below line

Sprite  *container = Sprite::create("BG.png");

Image already added to Xcode. Same code runs perfect in Xcode 7.2 Its strange crash only happens in Xcode 7.3. Both in device and simulator.

libPNG returns NULL. How to fix this ?


Solution

  • Got simple Solution. Go to build settings in Xcode and set

    Remove Text Metadata From PNG Files = NO
    

    By default its set to YES. Make it NO