I was wondering how would i pause my sprite kit scene when home button is pressed.
I found few answers here and tried it with notification center like this.
By the time your application has entered the background, it's probably too late.
Instead, we should register for the UIApplicationWillResignActiveNotification
notification and handle our just-before-exit code when we receive this notification.
Sprite kit for iOS 8 automatically resumes your game after exiting background mode. It happens after applicationDidBecomeActive is called. Also, Sprite kit for iOS 8 automatically pauses your game when it moves to the background.
Update: The following are the states of skView.paused when enter/exiting background mode for Xcode 5 and 6.
Xcode 6
Deployment targets 7.0, 7.1**, 8.0, and 8.1
applicationWillResignActive = NO
applicationDidEnterBackground = YES
applicationWillEnterForeground = YES
applicationDidBecomeActive = YES
** When I ran on a device running iOS 7.1, the states were all NO
Xcode 5
Deployment targets 7.0 and 7.1
applicationWillResignActive = NO
applicationDidEnterBackground = NO
applicationWillEnterForeground = NO
applicationDidBecomeActive = NO