We have been successfully using the PTT (Push-to-Talk) framework in our application since the release of iOS 17.
Audio is recorded by pressing a PTT button and speaking after the PTT framework initiates an AVAudioSession.
While the PTT framework has generally worked well since the iOS 17 release, we have received reports that, on occasion, after the app has been idle for a while ( when I have seen it my phone has been in flightmode over night), it suddenly records only silent audio. This issue does not occur every time but sporadically. For users experiencing this problem, pressing the PTT button results in no “PTT framework start sound,” and only “empty sound” is recorded. The only solution to restore audio is restarting the device. Restarting the app alone is insufficient, though leaving the PTT channel and rejoining it also resolves the issue.
I have reproduced the problem several times and observed that everything appears normal within the app. We receive an active AVAudioSession from the PTT framework, and it seems like the app is recording, but all recorded sound packets are silent.
Upon reviewing logs from the phone (via the Console app), I noticed that the app is muted when starting the recording and unmuted after stopping the recording. For example:
• Start recording ≈ 15:01:30
• Stop recording ≈ 15:01:44
• 15:01:30.124144+0100 audiomxd -CMSessionMgr- MXCoreSessionSetProperty: Session ‘sid:0xa80037, AppName(2717), ‘prim’’ isRecordingMuted updated to ‘1’
• 15:01:44.384208+0100 audiomxd -CMSessionMgr- MXCoreSessionSetProperty: Session ‘sid:0xa80037, AppName(2717), ‘prim’’ isRecordingMuted updated to ‘0’
When the system functions normally, the isRecordingMuted flag toggles between 0 and 1, but remains at 0 (non-muted) during recording. After stopping the recording, this state does not change anymore, unlike in the error state.
There is no difference in behavior whether the app is in the foreground or background when starting the transmission, or whether the PTT framework’s “Talk” button is used once the device enters the “error state.”
I have filed a bug report with logs provided on 28 November 2023 that is still open but no feedback.
We now have customers that are reporting this issue again on 17.5.1 and its starting to be a big issue.
Anyone else that have similar problems ?
Post
Replies
Boosts
Views
Activity
Our PTT framework app works great but we have now found an interesting scenario where you can get the PTT Framework in a state that is non functional.
Here's how it can be reproduced:
Start your PTT app ( With PTT framework ) Successfully joined channel and we can transmit and receive incoming transmits.
Put app in background. ( PTT framework/GUI symbol present in top)
Wait 1 min
Restart phone by pressing volume up + right side button
Wait 1 min
Start phone
We can now get two scenarios:
"Sceanario *1": In 4 of 5 cases the PTT framework symbol will be present directly when phone is started.
If we here start running our app we can see that the channel is restored and everyting works perfectly.
"Sceanario *2": In 1 of 5 cases the PTT framework symbol is not present after phone is started, and will not be even if waiting.
If we here start running our app we can see that the channel is also here restored (channelDescriptor(restoredChannelUUID channelUUID: UUID) -> PTChannelDescriptor) and we can successfully call "mgr.setTransmissionMode(newTransmissionMode, channelUUID: self.channelUUID)" on our channel ( PTT framework symbol still not present !!!!)
If we now try to call "requestBeginTransmitting(channelUUID: UUID)" we will get the PTChannelError error channelNotFound !!!!
We are then reacting to this and trying to do leave the channel "leaveChannel(channelUUID: UUID)" but also this is returning PTChannelError error channelNotFound in "channelManager(_ channelManager: PTChannelManager, failedToLeaveChannel channelUUID: UUID, error: Error))" !!!!
The interesting thing here is that my log is saying the following:
PTTFrameworkImpl: failedToLeaveChannel 6D5AFE96-9389-4CFB-893A-64D51D4542XX error=The operation couldn’t be completed. (com.apple.pushtotalk.channel error 1.), joined=true, activeChannelUUID is=6D5AFE96-9389-4CFB-893A-64D51D4542XX.
So we are getting channelNotFound for 6D5AFE96-9389-4CFB-893A-64D51D4542XX but when at the same type checking active channel with channelManager.activeChannelUUID we are getting 6D5AFE96-9389-4CFB-893A-64D51D4542XX.
After this we logout our user in our app.
If we now try to login again we will get a scenario where "requestJoinChannel(channelUUID: UUID, descriptor: PTChannelDescriptor)" will result in just NO RESPONS in means of
"channelManager(_ channelManager: PTChannelManager, didJoinChannel channelUUID: UUID, reason: PTChannelJoinReason)" or "channelManager(_ channelManager: PTChannelManager, failedToJoinChannel channelUUID: UUID, error: Error)"
FYI: The fault are occuring on 17.3 also and the syslog I provided here is on 17.3 developer beta
One interesting observation we have seen is that we only see this problem when "allow location access" is set to never for our app.