Saving all push notifications data got for an app when app is in terminate or inactive state - objective-c

I'm new to iOS development and currently i'm working on push notifications.I have a requirement where I will get push notifications for different functionalities in an app. When app is in terminate or inactive state all notifications will display in system notifications panel. When I tapped on particular notification remaining notifications data is lost. Is there any thing like we can store all push notifications data and when launching we can execute one by one.

No, not on iOS.
Apps like facebook do this by keeping the state of the push notification on there server. Thus allowing a client to fetch the alerts and show their read state.

Related

Disable local notifications on button press in Expo / react-native

I have an Expo app (which has been ejected but there is very little native code being used). I am using expo-notifications to schedule local notifications for the user. I am only doing this for background/killed state notifications. There are no foreground notifications.
I'd like to know if it's possible to turn them on or off when a button is pressed without losing all the notification data in React-native/Expo?
I want to add a toggle in the settings screen to turn notifications on or off and I can't figure out how to do this. I can of course cancel all scheduled notifications with cancelAllScheduledNotificationsAsync, but then if they toggle notifications back on all the existing ones would be lost.
I'm hoping to avoid having to store a bunch of data in AsyncStorage for this.
I'm working on handling this all in push notifications (which will solve a lot of headaches) but that's still a way out from being ready.

A question about grouped push notifications in the background (FCM)

Can I send grouped push notifications in the background? like this . Based on my knowledge about front programming (mobile app), background cannot control with front so I have to group in the back side (server). This means I have to send push notifications from the back side grouping push notifications so that mobile can get push notifications grouped like the image I uploaded above. Are there additional options when I send notifications? Below is my code to send push messages to my device.

Schedule many Push Notifications in React Naitve

I'm building an app where I'm using push notifications with help of Firebase Cloud Messaging and 'react-native-notifications' library. I managed to schedule a push notification in background.
Now I wonder, how can I schedule many push notifications (in background). Let's say, I have an array of strings and I want to make a push notification with a different string every day.
I know how I can make it with local notification but it means that the notification will not appear if the app is closed. Do you have an idea how it can be solved?
As I can see you managed to "show" a push notification when you are focused in the app.
If you want to send push notifications while your app is in the background you would need to use Firebase FCM.
Also if you need to send them in specific intervals I would recommend to use the Firebase callable functions to do so.

iOS 11 new notification center removes all delivered notifications after user make any action with one of them

I have an issue on iOS 11. All delivered notification automatically removing from notification tray after I select any action for one of them. This happens before my code start handling action. In iOS 10 everything is ok, all delivered notifications stay in delivered and disappear only notification where I proceed some action.
My app schedule reminders with custom action, 2 buttons Activate and Stop. User can receive many of them in one day, but its very important to keep already delivered notifications, because most of them is uniq and make different actions.
If it is iOS 11 new notification center behavior or known issue, where I can read about this? Thanks a lot for help.
Minimum deployment target in my app is iOS10 and I use new UNNotificationRequest for scheduling local notifications.

Not receiving local scheduled notifications on iOS

My CRNA (Expo) app schedules local notifications for event reminders. The notifications are scheduled and received perfectly on Android, but not iOS.
I've created a reduced test case: https://github.com/nandastone/crna-expo-local-notification-test
Tapping the "Send Immediate Notification" button calls Notifications.presentLocalNotificationAsync() which IS then received by the callback.
Tapping the "Send Delayed Notification" button schedules a notification in 5 seconds with Notifications.scheduleLocalNotificationAsync() which IS NOT received by the callback.
I'm aware that notifications are not displayed by iOS if the app is in the foreground (https://forums.expo.io/t/psa-reminder-notifications-in-ios-foregrounded-apps/641), but I'm not receiving notifications at all in the Notifications.addListener() callback. Closing the app after scheduling a notification also has no effect.
I'm fairly certain the Permissions.REMOTE_NOTIFICATIONS check is not required for local notifications (it certainly isn't on Android), but I've included it to be sure.
Please help!
In my reduced test case I was missing an event listener for receiving notifications (Notification.addListener()).
The issue in my real app, however, was the limit of 64 local notifications on iOS. The app was scheduling more than 64 notifications at once, and they were not all firing.