-
Notifications
You must be signed in to change notification settings - Fork 95
Remove aps size check Notification#background_notification? #91
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
Conversation
Notifications intended to be background were not getting set as expected due to other attributes (for example, custom_payload). Trying to fix: ostinelli#90
90a8855 to
49e105d
Compare
|
@noefroidevaux any thoughts on this? I'm not using those so feedback is welcome. |
|
@ostinelli I think my code was ok. The Apple documentation about this say:
My code tested that Maybe I miss something, but I don't see the problem. I use the current version of the Gem with background notifications and custom payload without problem. /cc @danielmorrison |
|
@noefroidevaux I looked at how we're using it (in production since this PR, no problems) and I see that the app sets So it is very possible this is on my side and easily fixed. With that in mind, seems like others could fall into this trap too. Should we check for specific key usage, or maybe even error. Explicitly fail here if |
|
Yes, you are right @danielmorrison , as the documentation from Apple that the "aps dictionary must not contain any keys that would trigger user interactions". We should raise an error when the |
|
@danielmorrison and @noefroidevaux would you like to create a PR that addresses these concerns? |
|
If there is going to be validation it should not be based on
However, it is NOT valid to have
I think the distinction here is around a "silent push" only, where you're requesting that your app be woken up in the background vs an "alert push", where there is a visual notification displayed to the recipient, either with or without a wakeup request. If there is any validation, it should be based on the Longer term, I think it would be useful to fully support |
Notifications intended to be background were not getting set as expected due to other attributes (for example, custom_payload).
I explained this a bit more in: #90.
We're testing this now on real-world code. I don't see any "gotchas" yet, but our use cases are fairly limited.