I'm trying to get push notifications on an app that's using Twilio IP Messaging. After following the instructions that I can see here: https://www.twilio.com/docs/api/ip-messaging/guides/push-notifications-ios
I'm drawing blanks.
The AppDelegate functions to register for remote notifications is working well - the iOS devices successfully provides the device token to the Twilio Client. However, the TwilioIPMessagingClient gives no indication of success or failure while registering the token. Moreover, I don't get any sign of push notifications when messages get sent. I'm not sure how to debug this any further since Twilio is a black box for APNS pushes.
Is there a logging service inside IPM/another debugging method I can access to see the status of APN pushes?
I'm a developer on the IP Messaging team at Twilio and can hopefully provide some additional information here.
Registration feedback from the IP Messaging SDK is currently limited to failures, which you'll receive via the delegate method -ipMessagingClient:toastRegistrationFailedWithError:
That being said, upon calling registerWithToken:
on your instance of the TwilioIPMessagingClient, you should see log entries that show the registration is being sent to our server:
TNNotificationClient | Starting registration..., id: <....>
TNRegTransport | Creating registration: apn - <....>
TNRegTransport | Registration is created, location: https://ers.us1.twilio.com/v1/registrations/<...>
When a message is sent to a channel, push registrations for members of that channel are queried and push messages sent to any registered members. Twilio uses the device token you provide for a given user via the registerWithToken:
method and the credential SID (starting with CR) you provided in the JWT the client was created with that created that registration. The credentials you provide to Twilio via the REST or web interface must match up to the registration performed on the device both in AppID as well as environment (sandbox versus production).
A few things to verify:
credential_sid
grant and it matches the CR and environment you are running the app in during push registrationIf you would like, I'd be happy to help you diagnose this further with your specific account details if you open a ticket at https://www.twilio.com/help/contact and reference this post. We'll be sure to update this SO post with any additional public information that arises from that conversation.
Randy
I found the Twilio Debugging console to be useful diagnosing push notification issues. I only found out about it after I got an email with an error message saying my APNS token was invalid. That was after spending a while trying to diagnose the issue.
You can find the console here: https://twilio.com/console/dev-tools/debugger
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With