GKVoice class allows your application to connect two iOS devices into a voice chat.
- iOS 3.0–7.0Deprecated
- watchOS 2.0–2.0Deprecated
Before you can use voice chat, your application must configure an audio session that allows for both play and recording (
k). For more information on audio sessions, see Audio Session Programming Guide.
The voice chat service uses a
client implemented by your application to find and connect to other participants. Each participant in the chat is identified by a unique participant identifier string. The client provides a participant identifier for the local user and translates other participant identifiers into connections to other users. The format and mechanism used to translate participant identifiers into network connections is defined by the client. See Game Center Programming Guide for a more complete discussion.
Your application can configure the voice chat service to control the volume level of both local and remote participants and to detect when someone is speaking.
To use the voice chat service, your application retrieves the default service and attaches a client to it, then either connects to another participant or waits for them to start a connection.