Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DD5D958A for ; Mon, 16 Apr 2012 20:06:04 +0000 (UTC) Received: (qmail 42960 invoked by uid 500); 16 Apr 2012 20:06:04 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 42932 invoked by uid 500); 16 Apr 2012 20:06:04 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 42922 invoked by uid 99); 16 Apr 2012 20:06:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Apr 2012 20:06:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8C10DD213; Mon, 16 Apr 2012 20:06:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: docs commit: Fixed CB-505 - Document iOS quirks for lifecycle events and specific "resign" and "active" events Message-Id: <20120416200603.8C10DD213@tyr.zones.apache.org> Date: Mon, 16 Apr 2012 20:06:03 +0000 (UTC) Updated Branches: refs/heads/master 3253e768e -> fc6c70610 Fixed CB-505 - Document iOS quirks for lifecycle events and specific "resign" and "active" events Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/fc6c7061 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/fc6c7061 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/fc6c7061 Branch: refs/heads/master Commit: fc6c706107fae6aa8c44138b5d0917b4b0dc51b2 Parents: 3253e76 Author: shazron Authored: Mon Apr 16 13:05:58 2012 -0700 Committer: shazron Committed: Mon Apr 16 13:05:58 2012 -0700 ---------------------------------------------------------------------- docs/en/edge/cordova/events/events.pause.md | 6 ++++++ docs/en/edge/cordova/events/events.resume.md | 10 ++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/fc6c7061/docs/en/edge/cordova/events/events.pause.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/events/events.pause.md b/docs/en/edge/cordova/events/events.pause.md index f611abe..bc2ad94 100644 --- a/docs/en/edge/cordova/events/events.pause.md +++ b/docs/en/edge/cordova/events/events.pause.md @@ -70,3 +70,9 @@ Full Example iOS Quirks -------------------------- In the pause handler, any calls that go through Objective-C will not work, nor will any calls that are interactive, like alerts. This means that you cannot call console.log (and its variants), or any calls from Plugins or the Cordova API. These will only be processed when the app resumes (processed on the next run-loop). + +- __resign__ event + + This iOS specific event is available as a variant of the **pause** event, and is often used to detect when the "Lock" button has been pressed to lock the device when your app is the foreground app. If your app (and device) is enabled for multi-tasking, this will be paired with a subsequent **pause** event, but only under iOS 5 (effectively all "locked" apps in iOS 5 that have multi-tasking enabled are put to the background). + + Under iOS 5, if you want your app to still run when the device is locked, you will have to disable multi-tasking (UIApplicationExitsOnSuspend - YES) for your app. This is different when you are on iOS 4 - to have your app run when the device is locked, the multi-tasking setting for your app does not matter. http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/fc6c7061/docs/en/edge/cordova/events/events.resume.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/events/events.resume.md b/docs/en/edge/cordova/events/events.resume.md index 1d0e90a..6e5675b 100644 --- a/docs/en/edge/cordova/events/events.resume.md +++ b/docs/en/edge/cordova/events/events.resume.md @@ -66,3 +66,13 @@ Full Example + +iOS Quirks +-------------------------- +Any calls to console.log during your **pause** event handler will be run now when the app resumes, see the iOS Quirks section for the **pause** event for an explanation. + +- __active__ event + + This iOS specific event is available as a variant of the **resume** event, and is often used to detect when the "Lock" button has been pressed to unlock the device when your app is the foreground app. If your app (and device) is enabled for multi-tasking, this will be paired with a subsequent **resume** event, but only under iOS 5 (effectively all "locked" apps in iOS 5 that have multi-tasking enabled are put to the background). + + Under iOS 5, if you want your app to still run when the device is locked, you will have to disable multi-tasking (UIApplicationExitsOnSuspend - YES) for your app. This is different when you are on iOS 4 - to have your app run when the device is locked, the multi-tasking setting for your app does not matter.