gpt4 book ai didi

ios - React-native-firebase Bigimage 无法在 ios 中工作

转载 作者:行者123 更新时间:2023-11-29 05:34:13 28 4
gpt4 key购买 nike

当应用程序关闭或打开时,我无法在 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 中显示通知但不显示大图像(丰富通知)

最佳答案

您可以使用IOSNotification

iOS 特定通知设置。

NOTE: Some of these settings apply only to iOS 9, or iOS 10+. These are flagged as appropriate.

launchImage returns nullable string;

获取与通知一起使用的启动图像。

setLaunchImage(launchImage) returns Notification;

设置通知的启动图像。

launchImage : string

例子

notification
.ios.setLaunchImage('notificationimage.png');

Description of IOSNotification

Description of Displaying Notifications

关于ios - React-native-firebase Bigimage 无法在 ios 中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57222330/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com