Tag: unnotificationattachment

使用UIImage或远程URL进行UNNotificationAttachment

在我的Notification Service Extension我从URL中下载一个图像,在通知中显示为UNNotificationAttachment 。 所以我把这个图像作为UIImage,并没有看到需要写在我的应用程序目录/组容器光盘只是为了设置通知。 用UIImage创build一个UNNotificationAttachment有什么好方法吗? (应该适用于本地和远程通知)