Meganbutterfly
Meganbutterfly

Reputation: 83

Spritekit/Universal images from assets not showing up on iOS 9?

I made a universal app using SpriteKit and Swift. Users have sent out bug reports on iOS 9 where sprite node images are showing up white/blank. But I haven't been able to reproduce this in the simulator. The images that don't show up are all device-specific in images.xcassets.

The images that do show up are the ones that are universal in images.xcassets.

What could I do to solve this (besides making them not device-specific) and could this possibly be an XCode/iOS bug?

Upvotes: 2

Views: 1354

Answers (2)

Ratnesh Singh
Ratnesh Singh

Reputation: 109

Please make sure that image adding into the images.xcassets is into png. if you used Jpg / jpeg then some time its not working into Xcode 7 / iOS 9.0

Upvotes: 0

MaxKargin
MaxKargin

Reputation: 1545

Yeah it's a bug for iOS 9.

What has worked so far is rebuilding everything and adding the format extension of the image whenever you call it. So for example, if your image is .png, then when you say something like:

SKSpriteNode *sprite = [SKSpriteNode spriteNodeWithImageNamed:@"myImage.png"];

Try this instead of using the string "myImage", which would normally work for previous OS's.

Upvotes: 2

Related Questions