Hi everyone, i'm struggling finding the best solution to implement the notifications in my iOS app.
I have two FB topics, one for syncing informations between the app and my server. (this should be silent push notification, and happends only in foreground)
the second FB topic, instead, is for actual notifications that i want to display, BUT i want also to save some data in the phone.
Example:
I want to notify my users when an update of the app is available sending a notification (with iosalert, so it displays automatically).
When the phone receive the message i want to update an existing map file, so, when the users will open the app the next time, in the file that was updated before, there is a sort of "flag", so i can show a dialog.
It's possibile to do something like that in iOS?
I also whant to display the badgenumber on the app icon, because it isn't automatic i was trying with:
Before realize that in background this sub is not called ?
I found out that silent notifications are not delivered when the user close the app, the "RemoteMessage" sub fires only when i click on the notification or the app is already in foreground.
There is a way to do what i need? it seems so painful ? ?
Thanks!!
I have two FB topics, one for syncing informations between the app and my server. (this should be silent push notification, and happends only in foreground)
the second FB topic, instead, is for actual notifications that i want to display, BUT i want also to save some data in the phone.
Example:
I want to notify my users when an update of the app is available sending a notification (with iosalert, so it displays automatically).
When the phone receive the message i want to update an existing map file, so, when the users will open the app the next time, in the file that was updated before, there is a sort of "flag", so i can show a dialog.
It's possibile to do something like that in iOS?
I also whant to display the badgenumber on the app icon, because it isn't automatic i was trying with:
B4X:
Private Sub Application_RemoteNotification (Message As Map, CompletionHandler As CompletionHandler)
Log($"Message arrived: ${Message}"$)
App.ApplicationIconBadgeNumber = App.ApplicationIconBadgeNumber + 1
CompletionHandler.Complete
End Sub
I found out that silent notifications are not delivered when the user close the app, the "RemoteMessage" sub fires only when i click on the notification or the app is already in foreground.
There is a way to do what i need? it seems so painful ? ?
Thanks!!