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

Sending iOS 13 apns-push-type header through FCM system #159

Open
macciomauro opened this issue Oct 24, 2019 · 1 comment
Open

Sending iOS 13 apns-push-type header through FCM system #159

macciomauro opened this issue Oct 24, 2019 · 1 comment

Comments

@macciomauro
Copy link

macciomauro commented Oct 24, 2019

Hi, I'm using Pigeon to send custom data notifications both to Android and iOS devices through Firebase and everything works fine.

Here's an example:

registration_ids
    |> Pigeon.FCM.Notification.new(nil)
    |> Pigeon.FCM.Notification.put_data(%{title: "The title", body: "The body"})
    |> Pigeon.FCM.Notification.put_priority(:normal)
    |> Pigeon.FCM.Notification.put_content_available(true)
    |> Pigeon.FCM.push()

As you know in iOS 13 Apple recommends the usage of a apns-push-type for notifications check and I saw you merged a feature to set this header in APNs system.

My questions are:
Is Firebase automatically setting apns-push-type header when Pigeon call it? If yes, with what value between alert and background?
There maybe should be a specific function to set it like put_priority or put_content_available?
Is there an alternative method to set it (custom headers)?

I found this Stackoverflow question that talk about ApnsConfig in Admin SDK but I don't think can be useful.

Thank you in advance

@halostatue
Copy link
Contributor

This may be helped by upgrading to HTTP v1 API for FCM (#169), which is on the roadmap for v2. There are specific options to put for different platforms in the same notification structure.

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

2 participants