VGVoiceClient
Before you can start a chat, the Client SDK needs to authenticate to the Vonage servers. The following additions are required to ViewController.swift.
NOTE: Notice that, you have already imported VGVoiceClient at the top of the file.
Add a VGVoiceClient instance and a User property, below the connectionStatusLabel.
Button targets
For the log in buttons to work, you need to add targets to them which will run a function when they are tapped. In the ViewController.swift file add these two functions.
Then link the two functions to their respective buttons at the end of the viewDidLoad function.
Add the log in function
At the end of ViewController.swift, add the login function needed by the user property. This function creates a session when the user property is set to a new value.
An error is shown if encountered, and the connectionStatusLabel is updated with the relevant connection status.
NOTE: The enableWebsocketInvites flag on the client configuration and the isUsingCallKit setting should not be used in production. Enable push notifications to make sure you get incoming calls even when your application is in the background using CallKit. See the push notifications guide for more information.
Build and Run
Press Cmd + R to build and run again. If you tap on one of the log in buttons it will log the client in with the respective user:

Making an app to app voice call
You make a voice call from an iOS app to another iOS app