Push to Talk framework failing state after restart

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:

  1. Start your PTT app ( With PTT framework ) Successfully joined channel and we can transmit and receive incoming transmits.
  2. Put app in background. ( PTT framework/GUI symbol present in top)
  3. Wait 1 min
  4. Restart phone by pressing volume up + right side button
  5. Wait 1 min
  6. 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.

Please file a developer feedback report for this issue so that it can be investigated. When you submit the feedback report please capture and attach a sysdiagnose from an iOS device after reproducing the issue and noting the relevant timestamps. Please include these timestamps in the feedback report so that we can review the system log at the time when this issue occurs.

https://developer.apple.com/bug-reporting/

I am seeing this exact behavior as well. Glad it's not just me! Have you found any workaround for it yet @Bodlund?

I can "fix" it by essentially aborting the channelRestoration path within PTT's didJoinChannel method, but that means it will never reconnect on force quits, device restarts, etc. Not ideal

I suggest re-testing your PushToTalk app using iOS 17.5, which includes changes to prevent PushToTalk call restoration issues similar to what is described above. If you are still encountering the issue on iOS 17.5 and above please file a developer feedback report for this issue using the Feedback Assistant so that it can be investigated:

https://developer.apple.com/bug-reporting/

Great, thank you! I was testing on iOS 17.4.1. After updating to iOS 17.5, I am seeing notable improvement.

After restarting my device 10 times with PushToTalk active, it restored PTT correctly 7/10 times and the blue PTT indicator was there.

However, upon receiving the first PTT message after restart and successful reconnection, I would not get message playback. It would show the PTT notification saying "{person} is speaking", but there would be no playback. If I received a subsequent message, I would get playback for both messages (including the first one that did not initially play back) and then things worked flawlessly going forward.

In the 3 occasions where it did not fully reconnect (i.e. the blue PTT indicator did not appear), when I foregrounded the app it reconnected fully and everything worked well from then on.

This is a significant improvement, as previously if it failed to reconnect our app would get into a broken state regarding PushToTalk where we couldn't leave or join any channels. It seems that does not happen anymore, which is great.

Ideally, though, it should successfully reconnect 10/10 times instead of 7/10 so users don't have to foreground the app to get back into a fully functional state.

Thank you for the insight on this! So glad there is improvement as of 17.5.

Some updates after a WWDC lab where I got to talk through this issue a bit with an Apple engineer:

  1. An issue on my end: I noted in my previous message that after successful PTT restoration it took two PTT messages for playback to be functional again. This was my fault. Re-initializing our AVAudioSession right away from within the incomingPushResult method fixed this for us

  2. Seems to still be a framework issue: In about 10-20% of cases, PTT does not fully restore itself after a device restart - meaning there is no blue PTT indicator after the device restarts. In these cases, receiving a new PTT message does appear to reinitialize PTT (the blue indicator suddenly appears and we get audio playback), but we still see some downstream effects in our app when this happens. For example, we can't reinitialize our microphone after PTT playback finishes (which we can do successfully when it fully restores in the 80-90% of cases)

I've filed a Feedback (FB13890499) detailing issue #2 with two sysdiagnoses: one where it fails to reconnect upon restart (no blue PTT indicator), and another where it fails to reconnect upon restart and then revives itself after I receive a new PTT message.

Both sysdiagnoses were captured on an iPhone 15 Pro running iOS 17.5.1.

Things are significantly improved in this area after updating to iOS 17.5. Happy to discuss further. Let me know if there's anything else I can provide.

Sry r.token promised to test this again a while ago but forgot. Tested now again on my iPhone 14 Pro with iOS 17.6.1 and I can verify that this is still a problem and easy reproducible ( first try ). My phone rebooted but no PTT framework symbol after restart. Frustrating that I hear nothing in my Feedback assistant ticket FB13526831 that I wrote in January ( still open )

Push to Talk framework failing state after restart
 
 
Q