1

My iOS7 project uses SpriteKit and multible SKTextureAtlas. I am able to build and run it without any issues using xCode5.1.1.

Trying to run the .ipa build by our build server, which is using xCode Command Line Tools, it crashes on startup when trying to load the first texture atlas:

Last Exception Backtrace: 0 CoreFoundation 0x18de52f50 __exceptionPreprocess + 132 1 libobjc.A.dylib 0x19a35c1fc objc_exception_throw + 60 2 CoreFoundation 0x18de52e90 +[NSException raise:format:] + 128 3 SpriteKit 0x190cdc4f8 -[SKTextureAtlas loadTextures] + 2708 4 SpriteKit 0x190cdd440 +[SKTextureAtlas atlasNamed:] + 208 . .

The directory myTextures.atlas is contained within the .app contents, as well as the actual .png files.

EDIT:

It seems that the Command Line Tools ignore the Enable Texture Atlas Generation Build Setting.

I could work around the issue by:

  • Set Build Setting Enable Texture Atlas Generation to NO

  • Add the follwing as Build Phrase shell script:

cd "$CONFIGURATION_BUILD_DIR"/*.app
/Applications/Xcode.app/Contents/Developer/usr/bin/TextureAtlas myAtlas.atlas

I consider this as an Apple bug and filed it, but better solutions highly appreciated!

shallowThought
  • 16,998
  • 6
  • 55
  • 100

0 Answers0