Push notifications setup
I have followed all the steps of the documentation (https://hub.openrainbow.com/#/documentation/doc/sdk/ios/guides/Push_notifications_setup)related to enabling push notifications and in IOS doesn't work.
When I make the videocall from the web, and the application is in background on the phone, it doesn't receive the video call, and i don't see anything in the log.
Push notifications are enabled, Firebase is configured and the certificates are installed in Rainbow Hub Developer.
Any suggestions?
-
Hi David,
Are you testing using the Rainbow Sandbox platform or the Rainbow Production platform
- Using the Sandbox platform, you need to upload your Apple development certificates using the Rainbow CLI
- Using the Production platform, you need to upload the Apple production certificates using the Rainbow HUB
In your log, you should receive something like that:
// INCOMING CALL
2019-05-10 22:38:08.232 Rainbow[1924:526291] [NotificationsManager:348] [PUSHKIT] didReceiveIncomingPushWithPayload {
callernumber = "";
displayname = "";
from = "xxxxxx@openrainbow.com";
medias = (
audio
);
messageID = "xxxxx-xxxxx-xxxxxx-xxxxxx";
resource = "xxx";
sessionID = zzzzzzzzzzz;
type = propose;
}Could you give me more details ?
Thanks in advance,
Olivier
-
Hi Olivier,
Thanks for your response. I'm using the production platform. We've installed the Apple production certificates in Rainbow Hub.
I think the problem we have is that we aren't initiating correctly in the application.
I added the code that is in the documentation, and when i'm testing on the phone, I see the following error in the log:
5.7.0 - [Firebase/Messaging][I-FCM002023] The object <AppDelegate: 0x10fe24870> does not respond to -messaging:didReceiveRegistrationToken:. Please implement -messaging:didReceiveRegistrationToken: to be provided with an FCM token. -
Hi David,
I think there is perhaps a misunderstanding. Rainbow notifications will never been received from Firebase.
This is the Rainbow platform when having the information that the device is in background that sends through Apple the pushkit notification.
In order to progress, could you :
- Check on your own that you have correctly added the push management into your app from our guide and from our sample: https://github.com/Rainbow-CPaaS/Rainbow-iOS-SDK-Samples/tree/master/Rainbow-iOS-SDK-Sample-Background
- Send me your Rainbow application ID in order for me to check if your application is correctly configured for receiving push notifications.
- Try to send a chat message from the Web and check if you receive it well when in background.
Hope this will help you to progress,
Regards,
Olivier
-
In the documentation of the example that you tell me how to register the notifications, it says:
[[ServicesManager sharedInstance].notificationsManager registerForUserNotificationsSettingsWithCompletionHandler:^(BOOL granted, NSError * _Nullable error) ...
However, in the web documentation: https://hub.openrainbow.com/#/documentation/doc/sdk/ios/guides/Push_notifications_setup
The part of enabling notifications states:
[[ServicesManager sharedInstance].notificationsManager registerForUserNotificationsSettings];Which one is correct? Testing in this way, gives us error when doing the build.
On the other hand, the id of the application is:
c60c3d60d37711e89d91fdc7623bfcb3
Thanks in advance,
-
Hi David,
We are checking that point.
Regarding your Rainbow application. Everything seems to be ok from my point of view. Both certificates have been uploaded and are actived for the IOS applications.
But be careful, when uploaded, we are not able to check that certificates so, be sure to have "transformed" them to be compliant to Rainbow. This is because "native" IOS certificates could be uploaded without generating issue on our side.
Regards,
Olivier
-
Hi David,
The right method to call is the first one, the completion handler has been added afterward:
[[ServicesManager sharedInstance].notificationsManager registerForUserNotificationsSettingsWithCompletionHandler:^(BOOL granted, NSError * _Nullable error)
The web documentation will be corrected.
Here is a link to the most up to date iOS Rainbow API : https://sdk.openrainbow.io/ios/docs/jazzy/Classes/NotificationsManager.html#/c:objc(cs)NotificationsManager(im)registerForUserNotificationsSettingsWithCompletionHandler:
Regards,
Vladimir
-
Hi David,
I'm happy to read that you made progress with the push notifications !
Regarding the crash when trying to pick up the video call may you please send me the logs you should get on the console and the relevant piece of code and send this to : vladimir.vyskocil@al-enterprise.com ?
Regards,
Vladimir
-
Hi Vladimir.
We've followed the code that's in the example:
https://github.com/Rainbow-CPaaS/Rainbow-iOS-SDK-Samples/tree/master/Rainbow-iOS-SDK-Sample-Background/RainbowiOSSDKBackground
When we receive the call with the application in the background (push notification) we have a strange behavior that we don't understand.
On a phone with version of IOS 12.3.1, when you receive the video call, instead of the pop up button of our app, appears the toggle of the operating system to answer the call. If you activate the call in the toggle, you've to click on the icon of the phone application to display our app to see the video call correctly.However, when the application is in foreground and the phone appears online on openrainbow website (from where we make the video call), answer button of our app (not the phone's native) works perfectly.
On a phone with version of IOS 11.4.1, when you receive the video call in the background, our application open, but we can't see the remote video from who's calling, and in openrainbow website is connecting all the time.
However, if we close application (not in background), we make a video call from the openrainbow website, we receive the notification on our phone, the application opens and shows the remote video.We don't know if it could be problems in login or for another reason.
Attached screenshots
Por favor, entrar para comentar.
Comentários
9 comentários