I am testing a native Swift iPhone app that adds synthesized speech to an existing cellular call using:
AVAudioApplication microphone injection permission
AVAudioSession.setPreferredMicrophoneInjectionMode(.spokenAudio)
AVSpeechSynthesizer
CXCallObserver
The audio background mode
Device: iPhone 16 Pro
Carrier: Vodafone Romania
iOS version: [enter exact version]
Both the system “Add Audio in Calls” setting and the app permission are enabled.
Confirmed behavior:
With the app in the foreground, the iPhone’s accessibility Auto-Answer Calls feature answers the call, and the remote caller hears the synthesized greeting.
Problem:
With the iPhone locked, the phone answers automatically, but the greeting does not start. Logs show ringing, connected, and ended events being processed together when the app returns to the foreground. This suggests the app was suspended.
The app does not record the call or play continuous audio while waiting.
Questions:
Is there a supported public API that lets this app wake or execute when a cellular call connects while the iPhone is locked?
Can microphone injection support this use case without keeping the app in the foreground?
If supported, what audio-session configuration and background execution mechanism should be used?
If unsupported, can you confirm this limitation?
I can provide a minimal sample project and diagnostic logs.
2
0
42