I am designing a SpriteKit game in swift, and inside my gameplay SKScene I have a method called when I want to pause the game. It looks like this:
func pause() {
view?.paused = true
}
The game pauses perfectly, but after a seemingly arbitrary amount of time (1 second to 120 seconds), the game just unpauses/resumes gameplay, without ever calling my resume() method. I am aware that sprite kit resumes gameplay automatically upon the app becoming active, but I have set a breakpoint in applicationDidBecomeActive, and it is not called. Does anyone know why this is happening?
I know I could set my own paused property and check it every update loop, but I much prefer this elegant solution if I could get it to work!