Skip to content

Missing fields in apns type definition for FCM live activities #2875

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

Open
ir-fuel opened this issue Mar 14, 2025 · 2 comments · May be fixed by #2891
Open

Missing fields in apns type definition for FCM live activities #2875

ir-fuel opened this issue Mar 14, 2025 · 2 comments · May be fixed by #2891

Comments

@ir-fuel
Copy link

ir-fuel commented Mar 14, 2025

[REQUIRED] Step 2: Describe your environment

  • Firebase Admin SDK version: 13.2.0
  • Firebase Product: FCM (auth, database, storage, etc)
  • Node.js version: 22.11.0
  • NPM version: 10.9.2

[REQUIRED] Step 3: Describe the problem

It seems the type definition of ApnsConfig does not contain the necessary entries for iOS Live Activities.

This is the current definition:

export interface ApnsConfig {
    /**
     * A collection of APNs headers. Header values must be strings.
     */
    headers?: {
        [key: string]: string;
    };
    /**
     * An APNs payload to be included in the message.
     */
    payload?: ApnsPayload;
    /**
     * Options for features provided by the FCM SDK for iOS.
     */
    fcmOptions?: ApnsFcmOptions;
}

however when looking at Firebase examples such as the one here:

https://firebase.google.com/docs/cloud-messaging/ios/live-activity

we see that apns contains a live_activity_token attribute.

"message":{
    "token": "<fcm_token:test>",
    "apns":{
      "live_activity_token": "<live_activity_push_to_start_token>",
      "headers":{
        "apns-priority": "10"
      },
      "payload":{
        "aps": {
          "timestamp": <timestamp>,
          "event": "start",
          "content-state": {
            "demo": 1
          },
          "attributes-type": "DemoAttributes",
          "attributes": {
            "demoAttribute": 1,
          },
          "alert": {
            "title": "test title",
            "body": "test body"
          }
        }
      }
    }
  }
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@janodetzel
Copy link

We're currently facing the same problem. I created a PR (#2891) adding the live_activity_token parameter.

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

Successfully merging a pull request may close this issue.

4 participants