andpush icon indicating copy to clipboard operation
andpush copied to clipboard

iOS13 Support.

Open yukitoto opened this issue 5 years ago • 2 comments

We need to set apns-priority and apns-push-type for header from iOS13. Is there any option to set these properties?

https://developer.apple.com/videos/play/wwdc2019/707/?time=800

yukitoto avatar Aug 28 '19 10:08 yukitoto

Is it correct solution?

client = AndPush.build(server_key)
client.push(payload, headers: { 'apns-priority': 10, 'apns-push-type': 'alert' })

yukitoto avatar Aug 28 '19 10:08 yukitoto

FCM wraps the APN and thus we have to follow FCM's specification. You could find how to specify apns-priority here (find the doc for the priority key).

On iOS, these correspond to APNs priorities 5 and 10.

With the andpush gem that calls the legacy FCM API, this is already possible:

payload = {
  ...
  priority: 5 # or 10 depending on your operation
}

response = client.push(payload)

yuki24 avatar Aug 28 '19 17:08 yuki24