I’ve been trying to set up some push notifications when certain triggers occur. The push notifications are working great, except the attachments (images) to the notifications aren’t showing up.
I tried attaching a jpg and a png. I tried every combination, with the file format in the extension, by specifying content-type: jpg/jpeg/png. I’m pretty much stuck at the moment. Has anyone gotten an image to show up in the notification?
I did try to put that gif that’s given in the example. That worked great. Are only gifs working at the moment?
Edit: I just tried adding a third party gif, and that seems to be working well, too.
- service: notify.iosapp
data:
message: "The heater has been left ON!"
data:
attachment:
url: http://i.imgur.com/MJomuzn.png
content-type: png
hide-thumbnail: false
I’ve also tried jpg versions, uploading the image to different image hosting sites, trying random images from google images searches, even having the image file locally and giving it the path to the image. It only seems to work with gifs for me, even third party gifs from google searches.
Am I doing it wrong?
edit: as a side note, I also tried attaching a map with long/lat coordinates. When the notification comes through and force touch the notification to expand it, it seems to want to load the map but only displays the loading circle and never loads the map. Not sure if this is an iOS 10 bug or what.
Just tested this out myself, it’s because the URL is HTTP not HTTPS and App Transport Security (ATS) kicked in. Change to HTTPS and it will work. Will fix this in the next build.
For others, I am in the same situation, All I had was the loading spinning circle, and today it just started to work. Go figure…
I guess patience is a virtue