Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

FCM: `apns.fcmOptions.imageUrl` and `notification.imageUrl` not rendering images for < iOS 18 and < ipadOS 18

未关闭
#2,807 3 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@chong-shao 已经在做这个了。

开始于 2024年12月19日。

评估

这个 Issue 还没有评估数据。

描述

api: messaging
[REQUIRED] Step 2: Describe your environment
  • Operating System version: < iOS 18, < ipadOS 18 (client), Ubuntu 14.04.6 LTS (server)
  • Firebase SDK version: 12.0.0
  • Firebase Product: Cloud messaging (FCM)
  • Node.js version: 16 (LTS)
  • Yarn version: 1.22.22
[REQUIRED] Step 3: Describe the problem
  1. Images do not render on iOS < 18 and ipadOS < 18 devices, when sending a payload with apns.fcmOptions.imageUrl or notification.imageUrl. I thought it might be related to image size so I sent an image with a size of 400 bytes but still no luck.

  2. Slightly unrelated, but the docs state to use apns.fcmOptions.image (source) whilst the TypeScript interface declares apns.fcmOptions.imageUrl (code). I've tried setting an ignore rule for the compiler to use apns.fcmOptions.image in the payload, whilst this also renders images for iOS 18 and ipadOS 18, it still doesn't render for iOS 17 and ipadOS 17 devices.

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

  1. Create notification payload with image url set as apns.fcmOptions.imageUrl or notification.imageUrl
  2. Send notification (using sendEachForMulticast())
  3. Observe received notification on iOS 18 and ipadOS 18 devices, image successfully displayed on both
  4. Observe received notification on iOS 17 and ipadOS 17 devices, image not displayed on either

Example: Successful notification on ios 18 with image

Screenshot 2024-12-12 at 11 31 42
Relevant Code:

Example payload

{
  apns: {
    fcmOptions: {
      imageUrl: "imageUrl"
    },
    payload: {
      aps: {
        alert: {
          body: "body"
        },
        mutableContent: true
      }
    }
  }
}
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
4 天 20 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

firebase/firebase-admin-node 的其他 Issue

查看 firebase/firebase-admin-node 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。