Browse Source

Only exec ready and launch on supported platforms - fixes #1406

Sebastián Katzer 8 years ago
parent
commit
fd613254c2
1 changed files with 6 additions and 2 deletions
  1. 6 2
      www/local-notification-util.js

+ 6 - 2
www/local-notification-util.js

@@ -416,12 +416,16 @@ exports.setLaunchDetails = function () {
 
 // Called after 'deviceready' event
 channel.deviceready.subscribe(function () {
-    exports.exec('ready');
+    if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
+        exports.exec('ready');
+    }
 });
 
 // Called before 'deviceready' event
 channel.onCordovaReady.subscribe(function () {
-    exports.setLaunchDetails();
+    if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
+        exports.setLaunchDetails();
+    }
 
     channel.onCordovaInfoReady.subscribe(function () {
         exports.applyPlatformSpecificOptions();