Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Since iOS9 upgrade SpriteKit images no longer display correctly

I've just updated to iOS 9 only to find that multiple images within my app no longer display. And for some reason, all SpriteKit text is yellow (it was white before).

The images in question are 2D sprites, rendered in Sprite Kit, but there doesn't appear to be very much consistency between which display and which don't. Certainly, no backgrounds display, and some images show as white boxes (not with the red X though).

Other sprites are upside down, or flipped in Y, as if coordinate systems have reversed. And particle effects no longer seem to display.

I should have tried the beta a while ago, since this breaks my live app, (which I've now taken down). But has anyone else experienced anything similar? Or might know what's wrong? It seems to me mainly a SpriteKit issue, however, all sprites from texture atlases seem to be working fine.

Update:

I've realised that it's all my sprites that aren't in a texture atlases. I found a forum post here: https://forums.developer.apple.com/thread/13358 that says iOS9 either needs the ".png" extension for every asset name in code, or you can remove and re-add all the assets in the Asset Catalog. Unbelievable!

This post encounters a similar issue, and apparently the solution is to add all atlases to XCAssets, and then set your target to the latest iOS. But then you lose backwards compatibility with iOS8.

like image 737
Smikey Avatar asked Sep 17 '15 11:09

Smikey


2 Answers

I have experienced similar issues and have sent a bug report.

Particle files no longer work with negative values. Particles that e.g. travel in a certain direction now just stay in one place. Some of them are rotated at random angles as well.

Textures seem to be broken in existing scene files. Deleting the sprite node, adding a new one to the scene file and setting the image again seems to work.

I dont get how this just gets left to the developers to fix. Its a huge issue that had to have been noticed.

Running the file on iOS 8 works fine, on iOS 9 its totally broken.

I am thinking of rebuilding the scene file in a seperate iOS 9 scene file. and loading the old one for previous versions at run time to at least fix the texture issues.

like image 95
some_id Avatar answered Jan 11 '23 22:01

some_id


As I posted on another question of mine, it seems the majority of iOS9 issues have been addressed in iOS9.2 beta, and Xcode 7.2 beta.

Better late than never :]

like image 25
Smikey Avatar answered Jan 11 '23 23:01

Smikey