From 704c8e0c158d93bcfa5d009fcc51fd5edc8e4567 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Mon, 25 Apr 2016 11:17:17 -0400 Subject: [PATCH] Issue #795: coldstart flag always set to true if the app has been opened through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1 --- src/ios/AppDelegate+notification.m | 1 + src/ios/PushPlugin.m | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ios/AppDelegate+notification.m b/src/ios/AppDelegate+notification.m index 41e88a56f..9d556001f 100644 --- a/src/ios/AppDelegate+notification.m +++ b/src/ios/AppDelegate+notification.m @@ -191,6 +191,7 @@ - (void)pushPluginOnApplicationDidBecomeActive:(NSNotification *)notification { pushHandler.coldstart = [self.coldstart boolValue]; pushHandler.notificationMessage = self.launchNotification; self.launchNotification = nil; + self.coldstart = [NSNumber numberWithBool:NO]; [pushHandler performSelectorOnMainThread:@selector(notificationReceived) withObject:pushHandler waitUntilDone:NO]; } } diff --git a/src/ios/PushPlugin.m b/src/ios/PushPlugin.m index 560acd5b5..b8cfeb875 100644 --- a/src/ios/PushPlugin.m +++ b/src/ios/PushPlugin.m @@ -504,6 +504,7 @@ - (void)notificationReceived { [pluginResult setKeepCallbackAsBool:YES]; [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + self.coldstart = NO; self.notificationMessage = nil; } }