3

There seems to be a bug with AppleTV. I have a SpriteKit scene with an SKNode 'worldNode' that contains all game nodes (and actions). I am able to detect when the Menu button is pressed on the Siri Remote and so in the SKScene I call

worldNode.paused = true

This pauses everything under worldNode as expected, including actions. Now, to detect when the Siri Button is pressed my understanding is that applicationWillResignActive gets triggered in AppDelegate. So inside applicationWillResignActive I post a notification with

NSNotificationCenter.defaultCenter().postNotificationName("ApplicationWillResignActive", object: nil)

The notification is received by my SKScene with the received notification's respective selector triggering worldNode.paused = true However, this does NOT pause everything under worldNode like it does when called normally from within the scene! I find some actions nested under worldNode are still running!

Is there a work around? Is this a bug?

Geoff H
  • 3,107
  • 1
  • 28
  • 53
  • 1
    http://stackoverflow.com/questions/22299905/spritekit-how-to-correctly-pause-and-resume-app – omer15 Dec 12 '15 at 12:14

1 Answers1

1

In your scene when the Menu Button is pressed call:

self.scene!.view!.paused = true

and use:

self.scene!.view!.paused = false

to resume.

Wes
  • 1,032
  • 7
  • 11