Reputation: 197
I'm using "twilio_voice" for a flutter application for generating and receiving call from app to real number and vice versa. When I'm trying to call to a real number from app it's working fine. But when i'm trying to receive call within the app, it's not working. When I checked at Twilio console I found "Error 52134 Invalid APNs device token".
I have already created the VOIP certificate in Appstore console and also generated a Push Credential in Twilio console. The SID also used in the backend.
In my applog I also found "Successfully registered for VoIP push notifications." as a confirmation. But still not working.
Upvotes: 0
Views: 530
Reputation: 197
Got the solution. The issue was in the registering device. I was sending fcm token to the server for registering device. But after changing it device UUID, it worked. Also point to be noted that, you will need a different SID from Twilio for development and Testflight. SID from Sandbox credentials won't work if you running app from TestFlight.
Upvotes: 0
Reputation: 31
After your app has register for the push notification, you will need to create a binding with the Push Token to the Twilio server. For that you will need an intermediate server of your own(Can be a Node js/PHP/Python server application). First you will make a rest api request to your own server from the app. The server application will send a binding request to Twilio server. Once that is done, you will receive push notification every time there is an incoming call via didReceiveRemoteNotification() delegate in AppDelegate.
For the server application sample and Rest api sample for iOS app, follow this documentation from Twilio: https://www.twilio.com/docs/notify/register-for-notifications-ios
Upvotes: 3