Search code examples
iosiphoneios-simulatorgamekitavaudiosession

iOS Simulator and GKVoiceChat


This is a pretty simple question, but I can't seem to find the answer in Apple's API documentation. I was just wondering if the iOS Simulator supports a GKVoiceChat session? It seems that I have everything correctly set up in my code, but no voice is transmitted.

For reference, here is the code I've implemented:

Here I set up the AVAudioSession as required

audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
[audioSession setActive:YES error:nil];

Here I create a voice channel and supposedly start it by setting it to active

gameVoice = [SharedMatch voiceChatWithName:@"allPlayers"];
[gameVoice start];
[gameVoice setActive:YES];

I also have implemented the playerVoiceChatStateDidChangeHandler but I think any truly relavent information is detailed above.


Solution

  • I have not tested this specific API, but I suspect it does not as input does not work for many higher level audio APIs in the sim.