-
-
Notifications
You must be signed in to change notification settings - Fork 102
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 support for apns-push-type #127
Add support for apns-push-type #127
Conversation
Required when delivering notifications to devices running iOS 13 and later, or watchOS 6 and later.
Codecov Report
@@ Coverage Diff @@
## master #127 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 5 5
Lines 262 266 +4
=====================================
+ Hits 262 266 +4
Continue to review full report at Codecov.
|
Is |
Good news! Node apn package just merged my PR to support this key. I suppose we have to wait for a new release version of the package, link it in dependencies and the this PR is good to be merged. I started to work on this ASAP because it is required in September when iOS 13 is being released. |
@funkenstrahlen They haven't done a releases in a long time, We do have a fork https://github.com/parse-community/node-apn and could use that in the mean time. |
@dplewis Great! So you suggest I submit the same PR to your fork as well? |
I opened a PR on the fork you referenced. I noticed the package currently references the |
What do you think about setting a default value for If you agree I am happy to add this change to the PR. |
@acinader Thoughts? |
Sorry, @dplewis I don't have an opinion at this point and am unsure of the implications. Maybe @davimacedo can help, or use your best judgment and we'll work out any issues that arise. |
"(Required when delivering notifications to devices running iOS 13 and later, or watchOS 6 and later. Ignored on earlier system versions.) The type of the notification. The value of this header is alert or background. Specify alert when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify background for silent notifications that do not interact with the user." I think that "alert" by default makes sense since it is the most common use case. We could maybe have a setting in the adapter to change this default to "background" if wanted? |
I do not think a setting to change the default is necessary because the The default is only relevant for users who are not aware of the new
|
Nice. So let's go ahead with your proposed solution. Could you please resolve the conflicting files? |
I will update the PR this weekend with the changes and also resolve merge conflicts. |
If defined explicitly the passed value for push type is used.
To be considered before merging: An updated version of |
I also created a PR for documenting this change: parse-community/docs#639 |
The code seems good to me, but, before merging, we need to solve the problem of node-apn. They haven't launched a new version yet. A see two options:
What do you think? |
It took me quite some effort to get the PR with support for the new header key merged into the Pointing to Therefore I think its best to maintain our own fork. I already created a PR with the required changes for the new |
+1 on forking, I’m on open source parse since the very beginning and node-apn looks pretty much abandoned since the very beginning of parse push adapter... |
I also prefer to go with our fork. @dplewis @acinader I don't have access to https://github.com/parse-community/node-apn . Could you please accept parse-community/node-apn#1 ? @funkenstrahlen could you also change our dependency to pin our fork in this PR? |
As soon as our fork is updated with the changes and has a new release I will update this PR to use the fork. |
@funkenstrahlen your PR is now merged in our fork. Can you please update this PR and pin to the new release https://github.com/parse-community/node-apn/releases/tag/v2.1.6-parse? |
@davimacedo Sure! I updated the PR with the required changes. I recognized that we referenced |
I think after this is merged we should also prepare a new release for this repository. I did not want to mix this into this PR. |
@funkenstrahlen I think you are right. I am thinking to update our fork's master to be pretty much the same they currently have in their master and release again. Do you agree? |
I am not sure what's the best approach. I run parse with We could start by setting "our" master to their In the long run we should take some time and pick some changes from their |
I agree. Now we have our master synced with the last commit of |
I created a new PR to add I can update the package dependency in this PR when the changes got merged there and a new version has been released. |
Thanks again. I've just merged and released a new version: https://github.com/parse-community/node-apn/releases/tag/v3.0.1-parse |
Package dependency has been updated to the new release. |
Thank you so much @funkenstrahlen ! I've just merged! |
Awesome! So it's time for a new release? Thanks for your work too! I enjoy working together with you :) |
Sure! I've just opened the PR: https://github.com/parse-community/parse-server-push-adapter/pull/135/files |
The label |
Required when delivering notifications to devices running iOS 13 and later, or watchOS 6 and later.
Apple docs: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns
I opened a PR on
node-apn
to support this key. Support fromnode-apn
is required to make this PR work.PR: node-apn/node-apn#656