Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

handleActionWithIdentifier not firing when app is not running (i.e. force-quit). #3

Description

@irfaan

handleActionWithIdentifier works perfectly when app is backgrounded, but as soon as the app is killed/force-quit, actions on push notifications go silently, appearing not to trigger [RNNotificationActions application:application handleActionWithIdentifier:identifier forRemoteNotification:userInfo withResponseInfo:responseInfo completionHandler:completionHandler]; at all.

Performing a task within the handleActionWithIdentifier declaration works fine (i.e. not sending a notification over the bridge to react-native).

I have an inkling that it might be related to done() (i.e. the completionHandler) being called too early and terminating the app before the task/operation can take place (see http://stackoverflow.com/a/29912511/1183749), though I have taken precautions to only call done() after completing my task (write to db). This, obviously, only works when the app is backgrounded and I don't know how else to test whether the completionHandler is being called at the right time and the app is not being terminated prematurely.

FYI: Background Modes for Remote Notifications is enabled in Capabilities.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions