ios - Appcelerator iOS Rich Push Notification 在通过 FCM 发送时不显示图像
问题描述
我正在尝试在我的 iOS 应用程序中发送丰富的通知。我正在使用 FCM 发送通知。下面是这里提到的有效载荷。我正在使用 FCM 模块(https://github.com/hansemannn/titanium-firebase-cloud-messaging)。我指的是这个示例项目并成功添加UNNotificationServiceExtension
到我的 Titanium 项目中。但这里的问题是,我只收到普通通知,通知面板中看不到图像。
{
"to": "e4DgI95lsPA:APA91bHFX9MUmJ....",
"content_available": true,
"mutable_content": true,
"click_action": "DOWNLOAD_CONTENT",
"data": {
"message": "Offer!",
"attachment-url": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/FloorGoban.JPG/1024px-FloorGoban.JPG"
},
"notification": {
"body": "Enter your message",
"sound": "default"
}
}
解决方案
检查链接的 github 示例的 README:
Rich Notifications are part of the Titanium SDK 7.2.0 release
当前的 SDK 版本是 7.1.1.GA。因此,它仅在您使用夜间构建或自定义 SDK 时才有效
推荐阅读
- angular - 构建 Angular 应用程序时出错需要一个表达式,但看到了 AST
- closures - 如何在闭包中返回 single.deferred
- javascript - 为什么我的菜单栏在 wordpress 中没有像在普通 html 文件中那样收缩时正确收缩?
- android - 如何在 RxJava2/RxKotlin 中正确组合包含点击事件和值的 Observables
- php - 从 MySQL 结果和 PHP 为 D3.js 树创建分层 JSON?
- php - 巨大的 php 文件有多糟糕?
- c - 我可以从 GDataOutputStream 获取或转换到底层 GOutputStream 吗?
- php - 学说2查询构建器不在之间
- architecture - 用于确定服务价格的基于规则的引擎。建议?
- itext - 目前遇到一个HTML大文件转pdf的问题