Voice over internet iphone sdk

Can someone tell me how I can use voice chat on iphone sdk. The game is used for voice communication via Bluetooth. I want my application to have a voice chat option over the Internet

Thanks Yasser

+3
source share
2 answers

The Apple GameKit framework provides a history in which you need to embed in-game chat.

Full documentation is here:

http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/AddingVoiceChattoaMatch/AddingVoiceChattoaMatch.html#//apple_ref/doc/uid/TP40008304-CH11-SW11

, GameKit, :

-(void) startInGameChat {
//Set up audio session
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:myErr];
[audioSession setActive: YES error: myErr];

GKMatch* match;
GKVoiceChat *teamChannel = [[match voiceChatWithName:@"redTeam"] retain];
GKVoiceChat *allChannel = [[match voiceChatWithName:@"allPlayers"] retain];

//Start the chat
[teamChannel start];

//Enable Mic
teamChannel.active = YES;

}
+2

Source: https://habr.com/ru/post/1780772/


All Articles