当应用程序关闭或打开时,我无法在 ios 的通知中显示大图像,但在 android 中工作
var display_notification = new firebase.notifications.Notification({
show_in_foreground: true
})
.setNotificationId(notification._notificationId)
.setTitle(notification._title)
.setBody(notification._body)
.setData(notification._data);
if (Platform.OS == "android") {
display_notification.android
.setChannelId("fcm_default_channel")
.android.setSmallIcon("ic_notification")
.android.setBigPicture(notification._data.picture)
.android.setColor("#171551");
} else {
display_notification.ios.addAttachment(
"1",
"https://files.allaboutbirds.net/wp-content/uploads/2015/06/prow-featured.jpg"
);
}
在 ios 中显示通知但不显示大图像(丰富的通知)