firebase / firebase-admin-node

Firebase Admin Node.js SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
1.62k stars 368 forks source link

[FR] Add subtitle for iOS push notifications #2217

Open daxaxelrod opened 1 year ago

daxaxelrod commented 1 year ago

Describe your environment Messaging/Notifications Describe the problem We cannot send push notifications with subtitle for iOS due to ApsAlert struct lacking a subtitle field.

FCM API and the APNS itself do support this field on iOS 9+ (and it's safely ignored on older versions).

google-oss-bot commented 1 year ago

I found a few problems with this issue:

lahirumaramba commented 1 year ago

Hi @daxaxelrod this is the Firebase Admin Node.js repo. Do you need this feature supported in the Go SDK?

Hey, @chong-shao WDYT?

daxaxelrod commented 1 year ago

Hey @lahirumaramba Yes looking to get this added for the node sdk

lahirumaramba commented 1 year ago

I misread your comment, apologies. It looks like the subtitle field is available in the Node.js SDK. See https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.apsalert.md#apsalertsubtitle

Does that help?

daxaxelrod commented 1 year ago

No problem! I've tried that (at least on v11.9.0) and it wasn't working for me. Am only able to get the title and body to work