Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications with attachments do not work when the app is compiled from source code #3232

Open
lucaardito opened this issue Dec 4, 2024 · 1 comment

Comments

@lucaardito
Copy link

lucaardito commented Dec 4, 2024

Model Name: iPhone14
Software Version: iOS 18.1.1
App version: 2024.9.5-2024.986

Home Assistant Core Version
2024.11.3

Describe the bug
After compiling the app from the source code and setting my instance of Firebase, if I send a notification from HA, I only receive notifications with the title and text, and the attachment is lost. If I use the HA version downloaded from the app store, it works correctly.

Is there any option to be set to make it work? Or should a specific setting be placed in the Firebase console? The Android version works without any problem with the same setup.

To Reproduce
Compile the app from the source code, set up a custom Firebase project, change the URLs in the source code (Rate limit and push notification), and send a notification with attachments from HA.

Expected behavior
The notification with the image should be received.

Screenshots

Compiled version

Screenshot 2024-12-04 at 15 51 05

App Store Version

Screenshot 2024-12-04 at 15 50 05

Test notification in firebase

Screenshot 2024-12-04 at 16 05 12

Result in Android

Screenshot 2024-12-04 at 16 05 57

Result in iOS (compiled app)

Screenshot 2024-12-04 at 16 07 11

@lucaardito
Copy link
Author

lucaardito commented Dec 5, 2024

After digging a bit I noticed that, when the notification is received, the Extensions-NotificationService.NotificationService class is never called.

final class NotificationService: UNNotificationServiceExtension {
    override func didReceive(
        _ request: UNNotificationRequest,
        withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void
    ) {
        //...

I imagine that the didReceive method should be called when the notification is received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant