Skip to content
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

Added support for iOS13 with apns-push-type #424

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

McPo
Copy link
Contributor

@McPo McPo commented Sep 23, 2019

apns-push-type is now a required key in the payload starting from iOS 13, without this notifications can be delayed or dropped altogether.

https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns?language=objc

@codecov-io
Copy link

codecov-io commented Sep 23, 2019

Codecov Report

Merging #424 into master will decrease coverage by 0.12%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
- Coverage    84.1%   83.97%   -0.13%     
==========================================
  Files          19       19              
  Lines        1346     1348       +2     
==========================================
  Hits         1132     1132              
- Misses        172      173       +1     
- Partials       42       43       +1
Impacted Files Coverage Δ
gorush/notification.go 100% <ø> (ø) ⬆️
gorush/notification_apns.go 84.26% <0%> (-0.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3812d35...849747c. Read the comment docs.

@appleboy appleboy merged commit 1c82f5c into appleboy:master Sep 23, 2019
@ghost
Copy link

ghost commented Sep 24, 2019

It is better to specify two values "alert", "background" because only they are valid

@McPo
Copy link
Contributor Author

McPo commented Sep 24, 2019

I'm not au fait with golang, but would have thought that the "casting" to apns2.EPushType would raise an error if it was an unknown. no? And I would have assumed its probably better to raise an error in such a case than just ignore it.

@HelmiRifai
Copy link
Contributor

@appleboy will there be a release soon with this?

@aksioto
Copy link

aksioto commented Sep 30, 2019

This field missed in protobuf file for grpc

@McPo
Copy link
Contributor Author

McPo commented Oct 1, 2019

Just noting this here. There appears to a be a third (currently undocumented, due to oversight) type called "voip". As we are running into the same issues described here https://forums.developer.apple.com/thread/123076. This will require a validation change in sideshow/apns2, which Ill make a PR. Just a heads up.

@McPo
Copy link
Contributor Author

McPo commented Oct 1, 2019

Turns out the PR and upstream lib doesn't actually validate the value. So we can just pass "voip" as it is now.

@appleboy appleboy mentioned this pull request Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants