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

how to set apns-expiration as 0 (zero)? #169

Open
deltapath-eric opened this issue Apr 27, 2020 · 0 comments
Open

how to set apns-expiration as 0 (zero)? #169

deltapath-eric opened this issue Apr 27, 2020 · 0 comments

Comments

@deltapath-eric
Copy link

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

The date at which the notification is no longer valid. This value is a UNIX epoch expressed in seconds (UTC). If the value is nonzero, APNs stores the notification and tries to deliver it at least once, repeating the attempt as needed until the specified date. If the value is 0, APNs attempts to deliver the notification only once and doesn’t store it.

if i understand correctly, the value can be 0 which make the notification will not resend

at client.go

if !n.Expiration.IsZero() {
  r.Header.Set("apns-expiration", fmt.Sprintf("%v", n.Expiration.Unix()))
}

seem if the value isZero(), the header will not be set and there is not way to set the header as 0

please correct me if i am wrong, thanks!

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

No branches or pull requests

1 participant