iOS Swift Client Sample

An iOS client written in swift :iphone: :cloud:

Building the client

Note: If a linking error occurs, set the flag Enable Bitcode to NO under the build settings tab for the project.

Controls

Configuration

The current configuration values are as follows:

static let signalingServer = "YOUR SIGNALING SERVER"
static let turnServer = "YOUR TURN SERVER"
static let username = "YOUR USERNAME"
static let credential = "YOUR CREDENTIAL"
static let tlsCertPolicy = RTCTlsCertPolicy.secure

With the exception of tlsCertPolicy these map directly to webrtcConfig options, as follows:

uniquely for tlsCertPolicy, we allow the caller to configure how the underlying tls library will verify certificates. This supports the following values:

How it works

Once the config settings are changed, the client will require a server to connect to. In this toolkit, we have a few Sample Servers.

When both the client and server are connected to the same signaling server, they will appear in the peer list.

You can initiate the connection using the client or server, simply select the peer from the list and press join. That will start the video streaming and you can use the above controls to move the camera around the scene.