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
Move to Frame based packets, support message priority #38
Move to Frame based packets, support message priority #38
Conversation
@@ -26,4 +26,5 @@ | |||
badge = none :: none | integer(), | |||
sound = none :: none | apns:apns_str(), | |||
apns_extra = [] :: none | [{atom(), integer()|boolean()|string()}], | |||
extra = [] :: proplists:proplist()}). | |||
extra = [] :: proplists:proplist(), | |||
priority = 10 :: integer()}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that, according to Apple...
The remote notification must trigger an alert, sound, or badge on the device. It is an error to use this priority for a push that contains only the content-available key.
... I think the default value should be 5
@jebu please as well rebase or merge from master. Thanks. |
As per https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/LegacyFormat.html#//apple_ref/doc/uid/TP40008194-CH105-SW1 a priority of 10 is assumed for all legacy messages. So preserving the default of 10 for compatibility. I've also set a priority of 5 for send_content_available/2 to prevent errors for pure content_available pushes. Rebased to master as per request. |
Fair enough |
Move to Frame based packets, support message priority
This pull request support new message format for apns with frames.
It also adds an extra field onto the apns record for message priority.
Added a test case which test this low priority message
Fixes issue #30