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

onSelectNotification callback is not called on iOS when title is null in zonedSchedule #865

Closed
dev-mush opened this issue Oct 22, 2020 · 2 comments · Fixed by #866
Closed

Comments

@dev-mush
Copy link

dev-mush commented Oct 22, 2020

Describe the bug
When using the plugin (also the latest 3.0 version, but the bug was present in prior version as well) and performing a zonedSchedule passing null as title, the notification is sent correctly, but the onSelectNotification callback is never called, passing an empty string instead of null fixes the problem. The problem does not occur on Android

One thing to notice, I'm using the following firebase plugins as well, can't update to their latest version right now, so don't know if on a with a later version of the firebase plugins the problem still occurs:

  firebase_core: ^0.4.3+2
  firebase_auth: ^0.16.1
  firebase_messaging: ^6.0.13

To Reproduce

  • build a flutter up with the flutter_local_notifications plugin on an iOS Simulator
  • set a breakpoint in the onSelectNotificationcallback
  • run the app in debug mode
  • perform a zonedSchedule passing null as title and whichever scheduledDate is comfortable
  • send the app in background
  • wait for the notification to appear and tap on it to send the app in foreground again

Expected behavior
the onSelectNotification callback is correctly called

@MaikuB
Copy link
Owner

MaikuB commented Oct 22, 2020

Would you be able to help test the fix by pointing your pubspec.yaml file to the fix_building_userinfo branch? If you're not familiar with how to do so, refer to the docs here. The plugin isn't at the root of the repo so you will need to specify the path as well. If it works then I'll merge the PR in and release afterwards. From my testing with the example app, it works but given you're the first person to have ever reported this (which probably means you're the only so far to create a notification with no title), it'd be great to have another person give it a spin

@MaikuB
Copy link
Owner

MaikuB commented Oct 23, 2020

As I haven't heard back, I've gone ahead and released the changes though it may be possible your issue was that you were tapping on a push notification as when using this plugin on its own, notifications without a title were originally not showing on iOS until I made the recent changes to fix this

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