Closed alex-evans123 closed 3 years ago
Hello @alex-evans123 ,
Do you use messaging or calls functionality?
To receive VoIP push notifications for calls, you need to register a push token from PushKit via Client.registerPushNotificationsToken API.
To receive push notification for messaging (for SendMessage/EditMessage events), you use the correct API. If you receive push notifications when the app is in the foreground, you should receive them in the background.
In both cases push notifications are received from iOS frameworks (PushKit/UIKit), so you need a 3rd party module to access it from JS code in your react-native application.
Best regards, Yulia Grigorieva
Hi @YuliaGrigorieva , I'm talking about SendMessage Push Notifications, currently I'm not receiving it in killed mode.
Hello @alex-evans123 ,
Thank you for the clarification.
Could you please provide the code snippet how do you handle an incoming push notification? And please confirm that this handler method is called when the app is in the foreground.
Best regards, Yulia Grigorieva
I have not handled the notification yet, I'm just logging it in
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler
and
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void(^)(void))completionHandler {
Please note that I wont be targeting devices older than iOS 10
Correct me if I'm wrong
Notification messages are automatically presented to the user
Data Messages are needed to be processed by the application and application can only process the notifications in foreground mode and if the user has killed the application the data message will not be delivered to the app.
Please note that I have enabled the background processing, remote notifications in build setting, let me know if I'm missing anything here, and if I'm not implementing any function required to receive the notification please let me know.
Please respond ASAP I have to deliver the app by Friday.
Thank you
For the flow of my app I cannot use react native firebase for notifications I'm implementing in a custom native module.
Any one here to help??
Hello @alex-evans123,
Data Messages are needed to be processed by the application and application can only process the notifications in foreground mode and if the user has killed the application the data message will not be delivered to the app.
This statement is incorrect. Data Messages are needed to be processed by the application, but they can be received in the background or killed state. Voximplant sends all push notifications only as data messages.
When you receive a push notification as data message, you need to process its data and show a local notification based on the data.
For the flow of my app I cannot use react native firebase for notifications I'm implementing in a custom native module.
In any case we do not support Firebase on iOS. Voximplant Push notifications are sent via APNS.
I suppose the issue is that you do not process the data from the push notification received in this method:
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler
You need to get the data and show a local notification based on it
Best regards, Yulia Grigorieva
Hi, I'm not receiving notifications when the application is killed, What to do??
Please not that I have registered the apns token via registerIMPushNotificationsTokenIOS and have called the manage function, my apns is also working correctly, I have added all the specified background modes as well, but Im only receiving notifications when the app is in foreground and the notifications stop when the user kills the app, please help