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
Don't set "aps" key if no well-known properties are present #141
Comments
You're right, however it didn't seem to me like there is an obvious use case for sending notifications which don't have an aps property - they can only be consumed when the app is running, and from my experience they're not designed for communication with a running app, the fact that it works is for convenience more than anything. I'll take a look though and if I can see an obvious way to implement it I will. -A
|
Cool, thanks! |
I've been very busy recently, will try to get something going over the Holidays. |
I see this behaviour is desirable when MDM is used. My apologies. I have developed a fix which will be in the next version. |
Thanks! |
It is possible and entirely valid to send a push notification through APNS containing just the payload
{"hello":"world"}
. This should arrive in the app's delegate method exactly as was sent (assuming the app is in the foreground when the notification is sent).Currently the library always adds the
aps
key even if none of thealert
,badge
, etc keys are set. Instead, theaps
key should only be set if at least one of the well-known properties are present.The text was updated successfully, but these errors were encountered: