- Navigate to
signaling-swift
folder. - Run
make
. - Run
./server
to start the server.
- Start the signaling server.
- Update the
defaultSignalingServerUrl
with you server port in fileConfig.swift
. - Build and run on a simulator. (Video Capture is not supported in simulator).
- Run the app on two simulators with signaling server running.
- Make sure both simulators are running on the same server.
- On the first device, click on
Send Offer
- this will generate a local offer SDP and send it to the other client using the signaling server. - Wait until the second device receives the offer from the first device (you should see that a remote SDP has arrived).
- Click on
Send Answer
on the second device. - When the answer arrives to the first device, both of the devices should be now connected to each other using webRTC, try to talk or click on the 'video' button to start capturing video (Video only works on devices not simulators).
When you start the app, if it is connected to the signaling server, the signaling status should say 'Connected'.
- When the
Send Offer
is tapped, local sdp of the client is sent to the other device via the signaling server. - Local Spd contains the message that contain all the information about the client which includes its public and private ip, media attributes etc.
- When the
Send Answer
is tapped after the offer is sent, the other device sends its SDP message as an answer describing its capabilities and session details.