PTT API doesnt work properly

the cases:

  • The app registered on a PTT channel
  • Server sent a push notification (using a PTT's token)
  • The app receiving the notification process it and open the link to server to read the data stream
  • the user tap the UI (app's or API) button to send voice message works as well

Everything works good until the user is unload the app from the memory but keeps the channel active, in this case the App can't open a network connection to the server side to read or write the data stream, even the user tap the API UI button to send a message.

Replies

can someone from Apple developer support team reply to this. we are also facing similar issue.

When your app is suspended or terminated any active network connections will be disconnected. The PushToTalk framework will wake your app whenever a PushToTalk notification is received or the user interacts with the PushToTalk system UI (i.e. to begin an outgoing transmission). When these events occur your app is launched in the background. This allows you to connect to your server and reestablish any network connections that your app needs.

Make sure that your app start up code and any code that you run when your app comes out of suspension runs as quickly as possible. During app start up you should create a PTChannelManager as soon as possible during the UIApplicationDelegate application(_:didFinishLaunchingWithOptions:) method so that your app is prepared to respond to PTChannelManager delegate call backs.