SpriteKit SKEmitterNode not rendering particles when using 'animateWithTextures' in iOS 9.0

Originator:simon.mcfarlane
Number:rdar://22626752 Date Originated:09-Sep-2015
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9.0 (13A4325c) - Xcode Version 7.0 beta 6 (7A192o)
Classification:Serious Bug Reproducible:Yes
 
Summary:
When using a SKEmitterNode in iOS 9.0, particles are not being emitted (or rendered to the screen) when the emitter's particleAction is a SKAction that uses the method 'animateWithTextures: timePerFrame'.

This works as expected in iOS 8.

The attached sample project contains a segmented control that allows you to see:
 - a single node with a single static texture (works on iOS 8 and iOS 9),
 - a single node with an animating texture (works on iOS 8 and iOS 9),
 - a particle emitter, emitting particles with a single static texture (works on iOS 8 and iOS 9),
 - a particle emitter, emitting particles with animated textures (works on iOS 8, DOES NOT work on iOS 9).

Running the app on an iOS 8 device / simulator and selecting the option 'Emitter - Animating' will allow you to see the final desired outcome of a confetti like effect. Basically falling particles that are animating through a series of textures to give a 3D rotating effect as they fall.

The following code is from a single animating node that works as expected in iOS 9.

    self.spriteAnimation = [SKAction animateWithTextures:self.textureArray timePerFrame:(kAnimationDuration/self.textureArray.count)];
    [self.confettiNodeAnimating runAction:[SKAction repeatActionForever:self.spriteAnimation]];


However the following code fails to produce emitted particles with animating textures on iOS 9.0:

    self.spriteAnimation = [SKAction animateWithTextures:self.textureArray timePerFrame:(kAnimationDuration/self.textureArray.count)];
    self.confettiEmitterAnimating.particleAction = [SKAction repeatActionForever:self.spriteAnimation];


This leads me to believe there is an issue with using animated textures in conjunction with the emitter's particleAction.

Steps to Reproduce:
1. Open provided example app on iOS 8 device or simulator.
2. Use the segmented control to view all nodes / emitters.
3. Notice how all segments selections produce either a single node or particle emitter (static or animating through textures).
4. Open the provided app on iOS 9 device or simulator.
5. Use the segmented control to view all nodes / emitters.
6. Notice how the 'Emitter - Animating' does not render any particles to the screen.
7. Notice that the 'Emitter - Static' will render particles to the screen, but will stop rendering if the user selects another option and then re-selects 'Emitter - Static'.

Expected Results:
Expected to see the animated particles being emitted in both iOS 8 and iOS 9 when selecting the 'Emitter - Animating' option in the provided example project (SpriteKitAnimationSample).

Actual Results:
Animated particles are not emitted / rendered to the screen when built for iOS 9.

Version:
Xcode Version 7.0 beta 6 (7A192o) - iOS 9.0 (13A4325c)

Configuration:
iPhone 6 Plus - Model A1524

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!