WKInterfaceSKScene Presented Scene Stops Working When Backgrounded

Originator:conrad.stoll
Number:rdar://28478149 Date Originated:26-Sep-2016 01:16 PM
Status:Open Resolved:
Product:watchOS SDK Product Version:3.0
Classification:Other Bug Reproducible:Always
 
I’m noticing that the scene and associated nodes contained by a WKInterfaceSKScene in my watchOS 3 app stop working when the app is backgrounded or deactivated for several minutes or more. When I resume the app and it becomes active again, the rest of the UI behaves as expected but the sprite kit scene and nodes are either no longer visible at all, or they don’t respond to SpriteKit actions and commands to modify the node’s content.

I’m setting up my scene and nodes in code in the app’s awakeWithContext method. I tried moving this code to willActivate and setting up the scene again and presenting it every time, but that doesn’t work either.

I believe this to be an issue with how watchOS may be optimizing resources for sprite kit content while the app is deactivated. I’m assuming it’s trying to unload content that then isn’t reloaded when the app is reactivated.

Comments

Setting WKInterfaceSKScene to paused = NO when the app becomes foregrounded is a potential workaround for this.

By conrad.stoll at Oct. 13, 2016, 6:06 p.m. (reply...)

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!