Skip to content

Thumbnail not showing in notifications #39

@devinjparsons

Description

@devinjparsons

Using the camera category or a url image attachment, the notification never contains the thumbnail. I've tried setting the hide thumbnail attribute to true and false and it still doesn't work. I did find this post (https://stackoverflow.com/a/39356505) but i'm not sure if the current codebase is using Notification Content Extension or Notification Service Extension.

EDIT:
Looking through the code I see we are implementing both the Notification Service Extension for the notification and then Notification Content Extension for the playback of the live feed. It does look like here https://github.com/home-assistant/home-assistant-iOS/blob/master/APNSAttachmentService/NotificationService.swift#L109 that you are setting the fileidentifier to the the attachmentURL.lastPathComponent but in documentation[0] for that method it says this doesn't work for urls, so maybe that is the issue. It also looks like the identifier is not then being used when calling the init function https://github.com/home-assistant/home-assistant-iOS/blob/master/APNSAttachmentService/NotificationService.swift#L147.

I may be way off on all this, haven't developed in swift for iOS, this is just my poking around at the logic.

[0] - https://developer.apple.com/documentation/foundation/nsstring/1416528-lastpathcomponent

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions