-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add iOS10 thread-id to notification #41
Conversation
When displaying notifications, the system visually groups notifications with the same thread identifier together. Fixes #40
Hello! I'm the main author of Pushy, an APNs library for Java. We're just getting around to adding support for
Thanks very much for your time! |
Hey @jchambers - You're absolutely right and I interpreted the docs incorrectly. I based this implementation of an early version of the docs and obviously got it wrong. I have patched locally to send via payload and can confirm it is working when sent as I was also able to confirm it was working in iOS by putting a breakpoint on the Payload: {
"aps" : {
"thread-id" : "my-thread-id",
"alert" : "Hello!",
"category": "my-category"
}
} Breakpoint: With regards to the apple docs which read: "When displaying notifications, the system visually groups notifications with the same thread identifier together.", as you picked up, this doesn't seem to be the case for iOS. A better reference and explanation: "The system calls this method to deliver notifications to your Notification Content app extension. Use this method to configure the contents of your view controller or to incorporate content from a new notification. This method may be called multiple times while your view controller is visible. Specifically, it is called again when a new notification arrives whose threadIdentifier value matches the thread identifier of the notification already being displayed. The method is called on the main thread of your extension". Thanks! Adam |
🤘 Thanks for the detailed explanation, and thanks for the indeed-much-better-explanation of what we're looking for. Hope I can return the favor some time! |
Fixes issue #61 by removing thread-id from the Notification struct. You now add a thread-id to the aps payload as per Apple docs. See #41 (comment) for discussion.
When displaying notifications, the system visually groups notifications
with the same thread identifier together.
Fixes #40