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

Support for apns-push-type in header #175

Closed
satheesh-moorthy opened this issue Aug 19, 2020 · 2 comments
Closed

Support for apns-push-type in header #175

satheesh-moorthy opened this issue Aug 19, 2020 · 2 comments
Labels

Comments

@satheesh-moorthy
Copy link

Hi,

Is there any plan to add support for apns-push-type.

iOS 13 introduced a new and required header called apns-push-type. The value of this header informs APNs of the contents of your notification’s payload so that APNs can respond to the message appropriately. The possible values for this header are:

alert
background
voip
complication
fileprovider
mdm

https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns

@sideshow
Copy link
Owner

@satheesh-moorthy This is already supported.
Example would be as follows:

notification := &apns2.Notification{
    PushType: apns2.PushTypeBackground
    ...
}

You can see more examples via tests here

func TestPushTypeAlertHeader(t *testing.T) {

Thanks

@satheesh-moorthy
Copy link
Author

Hi @sideshow , Thanks a lot for the information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants