SpriteKit sprite nodes loaded from Asset catalog sometimes results in blank textures

Originator:eric
Number:rdar://22737731 Date Originated:
Status:Open Resolved:
Product:iOS SDK Product Version:9.0
Classification:Other Bug Reproducible:Always
 
Summary:
Loading a SKSpriteNode using +[SKSpriteNode spriteNodeWithImageNamed:] results in a blank texture when running on iPad Mini/iPad 2/iPhone 5/iPhone 4s and attempting to load an asset that has iPad size classes from the Asset catalog. If attempting to load an asset that only has Universal size classes, or when running on an iPad Air and above or an iPhone 5s and above, this issue will not occur. 

A workaround exists and that is to create a SKSpriteNode using [SKSpriteNode spriteNodeWithTexture:[SKTexture textureWithImage:[UIImage imageNamed:@"ImageName"]]]

Steps to Reproduce:
1. Create an asset in the asset catalogue with iPhone and iPad size classes
2. Create an SKSpriteNode using +[SKSpriteNode spriteNodeWithImageNamed:] passing in the name of the asset created in step 1
3. Add the SKSpriteNode to your SKScene
4. Run on an iPad 2, iPad Mini, iPhone 4s, or iPhone 5

Expected Results:
+[SKSpriteNode spriteNodeWithImageNamed:] should be able to load assets from the asset catalogue with iPad size classes on all supported devices

Actual Results:
+[SKSpriteNode spriteNodeWithImageNamed:] isn't able to load assets from the asset catalogue with iPad size classes on all supported devices

Version:
iOS 9.0 (13A344)

Notes:
I've attached a project demonstrating the problem in ViewController.m inside the DemoScene class

Configuration:
iPad Mini MD528B/A

Attachments:
'iOS9SpriteLoadingBug.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!