ios
ios copied to clipboard
Local notification action button click action not working when app is not running (App is killed)
Here is my code for creating rich notification
PushNotificationIOS.setNotificationCategories([
{
id: 'userAction',
actions: [
{
id: 'dismiss',
title: 'Dismiss',
options: { foreground: false }
},
{
id: 'snooz',
title: 'Snooz',
options: { foreground: false },
},
],
},
]);
Function for scheduling local notification
PushNotificationIOS.addNotificationRequest({
fireDate: new Date(Date.now() + (5 * 1000)).toISOString(),
title: "Hello Alarm",
subtitle: "Wake up",
body: "Some more description",
sound: "Alarm.wav",
category: "userAction",
userInfo: {
name: "Test",
userId: "48932nmfe98ryhe9-oi32yrhfo"
},
id: new Date().toString(),
threadId: "490uio3rji",
repeats: "day"
})
This is working fine when the app is running or is in background, but the action button does not work when the app is in dead state
My purpose is to display a notification for alarm and if user presses the snooz
button, the notification should be re-scheduled doesn't matter whether the app is running or killed.
@Ravi448 I Am also facing the same issue did you find any solution to this issue?
@Farhankhaliid I wrote the code in Native language (Swift & ObjC) and linked them to React Native. That was the only solution what I got
@Farhankhaliid I wrote the code in Native language (Swift & ObjC) and linked them to React Native. That was the only solution what I got
@Ravi448 can you please share your native code here .
@Farhankhaliid I wrote the code in Native language (Swift & ObjC) and linked them to React Native. That was the only solution what I got
@Ravi448 can you please share the code here or approach you are using
Any ideas on how to accomplish this? Same problem here.
@Ravi448 Would be great to see how you managed to get it working on your end!
@Farhankhaliid I wrote the code in Native language (Swift & ObjC) and linked them to React Native. That was the only solution what I got
@Ravi448 can you please share the code here or approach you are using
@Farhankhaliid I wrote the code in Native language (Swift & ObjC) and linked them to React Native. That was the only solution what I got
@Ravi448 can you please share the code here or approach you are using
@Farhankhaliid please share your solution
Still, this library not supported the button click action when the app is in the killed state. Any other recommendations?
Same here, looking for a solution for this problem!