iOS Dev: applicationWillResignActive & applicationDidEnterBackground events


IOS’s applicationWillResignActive event

IOS’s applicationWillResignActive event is fired when:

  • single click the home button (only if UIApplicationExitsOnSuspend=NO)
  • there is incoming phone call
  • pulling down notification center in IOS 5+
  • double click the home button
  • screen is turned off by auto-lock
  • user turns off via power button
  • SMS message is received in IOS4
  • Alarm-based interruption occurs (displayed in an alert dialog) Notes: Starting IOS 5 with notification center, apps with notifications such as SMS, Calender, Reminders… can be configured to ‘Alert Style’ in Settings \ Notifications. If the app is configured as such, it will cause applicationWillResignActive event to fire when there is a notifition; otherwise, applicationWillResignActive event will not be fired.

Notes: UIApplicationExitsOnSuspend flag does affect the behavior of applicationWillResignActive event.

IOS’s applicationDidEnterBackground event is fired when:

  • single click the home button
  • phone call if user picks up
  • pulling down notification center (IOS 5+) & click on an notification to launch an app
  • double click the home button & select a different app
  • user turns off via power button (only if UIApplicationExitsOnSuspend=NO)
  • screen is turned off by auto-lock (only if UIApplicationExitsOnSuspend=NO)
  • Alarm-based interruption occurs (displayed in an alert dialog) & user chooses reply

Notes: UIApplicationExitsOnSuspend flag does affect the behavior of applicationDidEnterBackground event.

Advertisements
iOS Dev: applicationWillResignActive & applicationDidEnterBackground events

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s