Swift

Building the interface

To be able to place the call, you need to add two elements to the screen:

  • A UILabel to show the connection status
  • A UIButton to start and end calls

Open ViewController.swift and add these two programmatically by replacing the entire file content with the following:

The callButton has been hidden, its alpha is set 0, and will be shown when a connection is established.

Also, a target has been added for when callButton is tapped and will be used to place and end calls.

Build and Run

Run the project again (Cmd + R) to launch it in the simulator.

Interface

The callButton has been hidden, its alpha is set 0, and will be shown when a connection is established.

Also, a target has been added for when callButton is tapped and will be used to place and end calls.