From 0ed766a91c9f8a91d88ec9a7892ab9ee3ca40704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Thu, 19 Jan 2017 10:57:28 +0100 Subject: [PATCH] Manually fire enable event on iOS WebKit after deviceready event --- www/background-mode.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/background-mode.js b/www/background-mode.js index 8dcc3f9..ed3642d 100644 --- a/www/background-mode.js +++ b/www/background-mode.js @@ -350,3 +350,10 @@ channel.onCordovaReady.subscribe(function () { exports.setDefaults({}); }); }); + +// Called after 'deviceready' event +channel.deviceready.subscribe(function () { + if (window.webkit && exports.isEnabled()) { + exports.fireEvent('enable'); + } +});