home-assistant / home-assistant/iOS
icon_url avatar never shows: NotificationService extension is missing the Communication Notifications entitlement
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 520
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 264
Description
**iOS device model, version and app version**
Not device-specific — this is a build config issue, same on every device/iOS version. Details below.
**Home Assistant Core Version**
2026.8.3
**Describe the bug**
`data.icon_url` on a mobile_app notification is supposed to swap the app icon for a sender photo in the collapsed notification (lock screen / Notification Center row) via Communication Notifications. It doesn't — the collapsed row always shows the plain HA icon. Everything else in the same notification works fine (title, body, interruption-level, a regular `attachment` for the long-press view), so it's not a delivery problem.
**To Reproduce**
Send a notification with `data.icon_url` pointing at a reachable image, then look at it collapsed (don't long-press). App icon, not the photo.
**Expected behavior**
Collapsed row shows the photo from `icon_url` in place of the app icon.
**Root cause**
Went digging in the source instead of just reporting "it's broken." The whole chain looks right:
- `NotificationParserLegacy.swift` forwards `icon_url` into the payload
- `NotificationSenderParser.swift` reads it back out fine
- `NotificationCommunicationDecorator.swift` builds the `INSendMessageIntent`/`INPerson`, downloads the image, donates the interaction, calls `content.updating(from: intent)`
- both Info.plists declare `INSendMessageIntent` support
But `Configuration/Entitlements/App-ios.entitlements` has `com.apple.developer.usernotifications.communication`, and `Configuration/Entitlements/Extension-ios.entitlements` doesn't. The extension is where `updating(from:)` actually runs — it's its own sandboxed process with its own entitlements, separate from the main app — so it's missing the one capability it needs. The call just fails quietly (there's a catch around it that only logs locally) and the notification goes out unchanged. No crash, nothing visible, which is probably why it's flown under the radar.
Same failure mode, independently, on Apple's own dev forums: someone's otherwise-correct implementation didn't show an avatar until they added the Communication Notifications capability to the target. https://developer.apple.com/forums/thread/687225
**Suggested fix**
Add `com.apple.developer.usernotifications.communication: true` to `Extension-ios.entitlements` and turn the capability on for the extension target in Xcode, not just the main app.
**Additional context**
Searched for existing issues on this first (icon_url, communication notification, notification avatar) and didn't find anything. Happy to help verify against a real device.
Contributor guide
Research direction
Start with Configuration/Entitlements/Extension-ios.entitlements and compare it with App-ios.entitlements, then check the extension target's capabilities in Xcode. Verify the Communication Notifications entitlement is present for the extension and test a collapsed notification using data.icon_url; done means the sender photo replaces the app icon while other notification behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100