I have created a VoIP app in iOS
using the Sinch
library. I am able to make calls successfully, but am having trouble creating the double-height in-call status bar. By this I mean, my call window appears, and on that window I have a button to leave the view and go somewhere else (WITHOUT hanging up the call) and I would like a green double height in-call status bar to be displayed so that I may tap it and return me to call view.
When I send the app to the background, I see the double-height red bar to return to my app on springboard, so the background mode & voip mode seems to be set correctly. I know for sure WhatsApp
manage to get the green bar (as seen here).
I've searched for a while now and the best I could find is to use AVAudioSession
as answered on this question.
However even after following the instructions there and trying to add some other ideas, I can't get the green in-call status bar to popup. It feels like I would have to tell iOS
which view my call is being handled on? So that it knows when to show the green bar?
The code I've tried:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionModeVoiceChat error:nil];
[[AVAudioSession sharedInstance] setActive:YES error:nil];
This is apparently already handled by Sinch
however, as mentioned in their documentation so really I'm at a loss.
The Sinch SDK applies the audio session category mode AVAudioSessionModeVoiceChat for improved voice quality.