问题
I want to implement an app by which voice & text chat between two iOS devcices under a network become possible. I dont need voice call facility to any phone like LinPhone or SiPhone. I have studied over them & found too complex for me. Is there any simple SDK to make this possible???
By the way, user identification may be done by e-mail verification....
回答1:
I think one best way to do it using XMPP Framework. Using XMPP you can send files & text to other persons. Using it you can record voice message & send it across. There are some links for it:
GitHub Project Link for XMPP Chat
Building a Jabber Client for iOS: XMPP Setup
Hope it helps to you.
EDIT:
Apple's GameKit framework provides evertyhing you need to implement in-game chat.
The 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
Assuming you have allready connected the App to one or more other players using GameKit, you can start the voice chat like so:
-(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;
}
来源:https://stackoverflow.com/questions/13250498/how-to-implement-voice-text-chat-between-two-ios-device