Closed mwagstaff closed 4 months ago
Probably me doing something wrong, but I can't get images working in my notifications.
I've tried quite a few different options and whilst the notifications come through just fine, the images simply don't show up. Any ideas/tips welcome.
Example code I'm using where the notification text comes through fine, but not the image:
notification.rawPayload = { "aps": { "alert": { "body": "Push notification body", "title": "Push notification title" }, "mutable-content": 1, category: "rich-apns" }, "urlImageString": "https://i.imgur.com/t4WGJQx.jpg" };
My bad, after a lot more head scratching and googling, it seems that I need to add a Notification Service Extension to my app. Things just got a lot more complicated... but I will close this issue out.
Probably me doing something wrong, but I can't get images working in my notifications.
I've tried quite a few different options and whilst the notifications come through just fine, the images simply don't show up. Any ideas/tips welcome.
Example code I'm using where the notification text comes through fine, but not the image:
notification.rawPayload = { "aps": { "alert": { "body": "Push notification body", "title": "Push notification title" }, "mutable-content": 1, category: "rich-apns" }, "urlImageString": "https://i.imgur.com/t4WGJQx.jpg" };