Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

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 #795

Closed
kilnan opened this issue Apr 11, 2016 · 7 comments

Comments

@kilnan
Copy link

kilnan commented Apr 11, 2016

Expected Behaviour

coldstart flag is expected to be false when the notification is received while the app is open, either in background or foreground

Actual Behaviour

coldstart flag seems to be always set to true if the app has been opened through a push notification alert

Reproduce Scenario

open the app by clicking the app icon, send a notification to your device and check it. (foreground)
put the app in the background send a notification to your device and click on the alert to get to the app again, so check the received notification (background)

now, close the app and open it by clicking a notification. All the notifications received afterwards will have the coldstart flag set as true

Platform and Version

ios 9.3.1

Cordova CLI version and cordova platform version

cordova 6.1.0
cordova ios 4.1.1

Plugin version

1.6.2

Sample Push Data Payload

"payload": { "userId": 123, "goToPage": {"id":"subpage-chat", "parameters": {"conversationId":1}}}

Logs of received notification

foreground case:
{"count":0,"sound":"soundName","additionalData":{"foreground":true,"goToPage":{"id":"subpage-chat","parameters" {"conversationId":1}},"userId":123,"coldstart":true},"message":"Foo bar"}

background case:
{"count":0,"sound":"soundName","additionalData":{"foreground":false,"goToPage":{"id":"subpage-chat","parameters":{"conversationId":1}},"userId":123,"coldstart":true},"message":"Foo bar"}

@kilnan kilnan changed the title coldstart flag always set to true on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1 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 Apr 11, 2016
@kilnan
Copy link
Author

kilnan commented Apr 11, 2016

I edited the description: I did not figure out that the flag was always set to true only if the app is opened through a push notification alert

@macdonst macdonst added this to the Release 1.7.0 milestone Apr 11, 2016
@macdonst
Copy link
Member

@kilnan I tested today and could not reproduce. I can get coldstart to flip between true and false depending if the app is started or not.

@kilnan
Copy link
Author

kilnan commented Apr 12, 2016

To be sure to be on the same page, what I'm saying is that if we start the app with a notification, the notification that we used to open the app has correctly the coldstart flag set as true, but then also all the notifications we get afterwards have the flag set as true, while I would expect those to be set as false.

If we open the app "normally", by clicking the icon, the flag is always set as false, just like we would expect.

Let me know If is there any other detail I could provide to help you guys reproduce it.

@tgensol
Copy link

tgensol commented Apr 17, 2016

Not sure if I have the same issue, but the badge is always ON, for all my ios 9.3.1 users, as soon as they got one notification. I do not have more details for now to share with you. with 1.5.3 or 1.6.2 versions of the plugin. And this is since the new 9.3.1 iOs.

They can open and close the app, the notification will always stay on the icon of the application.

@macdonst
Copy link
Member

@tgensol that is a totally different issue than what @kilnan has reported. Please open a new issue.

macdonst added a commit that referenced this issue Apr 25, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
@macdonst
Copy link
Member

@kilnan Fixed for the 1.7.0 release.

macdonst added a commit that referenced this issue Apr 29, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue May 5, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue May 11, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue May 25, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue May 26, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue May 26, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue Jun 3, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
macdonst added a commit that referenced this issue Jun 6, 2016
…ned through an alert, on ios 9.3.1, plugin version 1.6.2 cordova 6.1.0 cordova ios 4.1.1
@macdonst macdonst removed the staging label Jun 6, 2016
@macdonst macdonst closed this as completed Jun 6, 2016
@lock
Copy link

lock bot commented Jun 4, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants