Skip to main content

Push Notification App Setup

VoIP Push - App Setup

The following setup is required in your application to receive Telnyx VoIP push notifications:

a. Add Push Notifications capability to your Xcode project

  1. Open the xcode workspace associated with your app.
  2. In the Project Navigator (the left-hand menu), select the project icon that represents your mobile app.
  3. In the top-left corner of the right-hand pane in Xcode, select your app’s target.
  4. Press the +Capabilities button.

Screen Shot 2021-11-26 at 13 34 12

  1. Enable Push Notifications

Screen Shot 2021-11-26 at 13 35 51

b. Configure PushKit into your app:

  1. Import pushkit
  1. Initialize PushKit:
  1. Implement PKPushRegistryDelegate
  1. If everything is correctly set-up when the app runs APNS should assign a Push Token.
  2. In order to receive VoIP push notifications. You will need to send your push token when connecting to the Telnyx Client.
For more information about Pushkit you can check the official Apple docs. Important:
  • You will need to login at least once to send your device token to Telnyx before start getting Push notifications.
  • You will need to provide pushMetaData to processVoIPNotification() to get Push calls to work.
  • You will need to implement ‘CallKit’ to report an incoming call when there’s a VoIP push notification. On iOS 13.0 and later, if you fail to report a call to CallKit, the system will terminate your app. More information on Apple docs

Multidevice Push Notifications

Telnyx WebRTC supports multidevice push notifications. A single user can have up to 5 device tokens (either iOS - APNS or Android - FCM). When a user logs into the socket and provides a push token, our services will register this token to that user - allowing it to receive push notifications for incoming calls. If a 6th registration is made, the least recently used token will be removed. This effectively means that you can have up to 5 devices that can receive push notifications for the same incoming call.

Disable Push Notification

Push notifications can be disabled for the current user by calling :
Note : Signing back in, using same credentials will re-enable push notifications.