callback/callback-ios — pull request #25 by devgeeks (2011-11-25 07:41:03+00:00)
Title: Added 'resign' and 'active' events.

I added two new events because applicationWillResignActive and
applicationDidBecomeActive were not firing events the way
applicationDidEnterBackground (pause) and
applicationWillEnterForeground (resume) were. This was fine in the case
of applicationWillEnterForeground (resume) but
applicationDidEnterBackground (pause) was not able to get the event
back to the JavaScript side before the app went into the background.
See
http://stackoverflow.com/questions/8223020/pause-event-is-not-working-pr
operly-in-phonegap-iphone/8224125#comment10128466_8224125

This meant the event was essentially not firing until the app resumed
again. The method applicationWillResignActive (resign) occurs earlier
in the event chain so your PhoneGap app has a chance to turn off
timers, etc. The only downside is that this event is also fired when
the screen is locked even if your app is not truly in the background.