This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
iOS notification from cold boot #117
Labels
Comments
@Deathspike Line 244 is:
so maybe a pull request or point me at exact line. |
Change:
On https://github.com/phonegap/phonegap-plugin-push/blob/master/src/ios/PushPlugin.m#L186 with:
Not sure how it ended up with L244 earlier. |
macdonst
added a commit
that referenced
this issue
Sep 14, 2015
@Deathspike merged and thanks |
This thread has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When the application has been killed completely, and a notification is tapped in the action center, the application launches but does not process the notification correctly. This is the flow of actions that occurred during my investigation:
didReceiveRemoteNotification
is fired; stores the notification aslaunchNotification
.applicationDidBecomeActive
is fired; useslaunchNotification
to invokenotificationReceived
.notificationReceived
is fired; processes and fires it into JavaScript world.init
is fired, and JavaScript event handlers are attached.At (4), the notification from (3) is lost. Some observations to handle the situation gracefully:
notificationReceived
does not check if thecallbackId
is registered yet (L244).init
recognizes a pendingnotificationMessage
and invokesnotificationReceived
(L111).So,
notificationReceived
merely needs to check ifcallbackId
is available. Replace:On https://github.com/phonegap/phonegap-plugin-push/blob/master/src/ios/PushPlugin.m#L244 with:
A pull request seemed like overkill for a one-line change. I'd appreciate it if this was merged 👍
The text was updated successfully, but these errors were encountered: