Skip to content

notification event not fired for remote notifications when app fresh open (not on background) #156

Open
@diegomichell

Description

@diegomichell

Report

Environment

  • Platforms: iOS
  • iOS version: 13.5

Issues and Steps to Reproduce

  1. Register for notifications and fully close the app.
  2. You will still get notifications but when you click on them your app will open but 'notification' event won't fire.

Expected Behavior

-'notification' event should be fire.

Actual Behavior

-You received a notification with the app fully closed (not in background) and it will take you to your app main screen and won't execute any custom logic you had put on your listener for 'notification' event.

Link to Code

  // notification: Fired when a remote notification is received. This won't work
  IOSNotificationHub.addEventListener('notification', this._handlerRemoteNotification);

 // notification: Fired when app is fresh opened from remote notification. This is a current workaround you can use, call getInitialNotification on your app initial load and check whether there is a notification.
    IOSNotificationHub.getInitialNotification().then(notification => notification && this._handlerRemoteNotification(notification));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions