Skip to content

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

Open

Description

@macciomauro

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

Activity

  1. halostatue commented on Jan 11, 2021

    @halostatue
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions