Source code for Push To Talk demo app?

I was just watching the Enhance voice communication with Push To Talk WWDC22 session video and was wondering (a few questions) --

(1) (when) will you be making the demo app available that was shown at the beginning of the video?

(2) There was some detail given regarding the new APNs push type ("pushtotalk"), but it was unclear to me if that's something I need to handle manually, or if those will be sent automatically when I do channelManager.requestBeginTransmitting?

(3) How does the audio data itself get routed around? Is that handled by the system between the requestBeginTransmitting and stopTransmitting calls? Or somehow part of the APNs payload? Or something we must handle?

Thank you! thanks!!

I also need help implementing Push To Talk into my app, and having the demo app's source code would help a lot. Searched a lot today and haven't found anything. Can anyone help with the source code if they have it?

Just wanted to share what I discovered today with my testing. You will need to create a new APNs cert if you haven't done that lately and are using cert based push notifications. They have updated the text to read:

Apple Push Notification service SSL (Sandbox & Production) Establish connectivity between your notification server, the Apple Push Notification service sandbox, and production environments to deliver remote notifications to your app. When utilizing HTTP/2, the same certificate can be used to deliver app notifications, update ClockKit complication data, and alert background VoIP apps of incoming activity. A separate certificate is required for each app you distribute.

After I updated my cert, I was able to get the incoming push notification to properly deliver to:

func incomingPushResult(channelManager: PTChannelManager, channelUUID: UUID, pushPayload: [String : Any]) -> PTPushResult

I was using a simple script that calls curl like this:


curl -v \
-d '{"activeSpeaker":"Bart"}' \
-H "apns-push-type: pushtotalk" \
-H "apns-topic: <insert your bundle id here>.voip-ptt" \
-H "apns-priority: 10" \
-H "apns-expiration: 0" \
--http2 \
--cert key.pem \
https://api.sandbox.push.apple.com/3/device/8f12332d93d45d39d407368175e07b76d2494d0d67439289b3a50c7bd6f8f206

Also, I noticed that PTChannelTransmitRequestSource is always of type .unknown when the system UI is used to transmit.

I would love to have some sample code too. I'm still working on hooking up the portions of my app that would record/playback the audio.

I would like to know when the demo source will be available?

Hi,

Unfortunately, at this time, the specific demo app source code in the WWDC session is not pending public release.

You can however copy from the "Code" tab in the Developer app. It has the basic implementation skeleton to get you started.

If you already have a PTT or VoIP calling app, you should be able to reuse the vast majority of what you already have.

See also https://developer.apple.com/forums/thread/707689

Hi, where is this "Code" tab you speak of? I don't see anything of the sorts on the page

Push To Talk is system ui framework with Audio Session handling and custom APNS feature. You need to develop backend ptt service like webrtc or better mediasoup.

Source code for Push To Talk demo app?
 
 
Q