MaikuB / MaikuB/flutter_local_notifications

[macOS] The payload is not delivered in onDidReceiveBackgroundNotificationResponse.

Open
#2,771 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
2.7k
Forks
1.6k
Avg merge
4d 8h
Merged PRs (30d)
4

Description

In macOS, when a notification is clicked while the app is running, onDidReceiveNotificationResponse is called successfully, and the payload is also delivered successfully.

However, when I click the notification while the app is closed, the app launches, but the payload is not delivered, and I am not sure if onDidReceiveBackgroundNotificationResponse is called correctly.

On macOS, as shown in the attached image, 'Background Modes' is missing under 'xcode > Runner > Signing & Capabilities > + Capability'. Could this be the reason?

On iOS, 'Background Modes' is present, so when FCM is received, onDidReceiveNotificationResponse is called normally, and the payload is delivered correctly.

Please help me.

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the macOS case where a notification is clicked after the app is closed, then inspect the onDidReceiveBackgroundNotificationResponse and onDidReceiveNotificationResponse entry points. Compare callback and payload behavior between the closed and running states; done means the issue is explained and the payload is delivered correctly or the limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.