This article will help you to start building your iOS application with Voximplant.
There are two ways to add Voximplant libraries to your Xcode project: Cocoapods and Swift Package Manager.
Start with Cocoapods
Skip this section if you are using Swift Package Manager.
- Install CocoaPods (See CocoaPods getting started guide)
- If you do not have a podfile, create it by running
pod initin the project directory
- Add VoxImplantSDK dependency in the Podfile:
platform: ios, '11.0'
target 'MyApp' do
// other dependencies and configurations
- Run the
pod installcommand in the project directory to install the SDK
- From now on, open your project via the newly created .xcworkspace file
We discontinued bitcode support since the 2.48.0 SDK version.
Start with Swift Package Manager
Skip this section if you are using CocoaPods.
Alternatively, you can use Swift Package Manager to add the dependencies to your project.
- Open your project in Xcode
- Go File → Swift Packages → Add Package Dependency
- Add the iOS SDK github repository contents.
- Select the SDK version
- Declare the package in the Package.swift file's
.package(url: "https://github.com/voximplant/ios-sdk-releases.git", .upToNextMinor(from: "2.51.0"))
Initialize the SDK
- If you need to use camera and microphone in your app, open the Info.plist file in your project and add the following keys:
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
Provide values to the added keys. The value is what a device shows when prompts for camera or microphone access.
- Declare four Background modes. Go to your project's main file, Singing & Capabilities tab, click the "+" button on the top and choose "Background modes". To enable calls and push notification functionality, choose the following modes as you see on the screenshot:
Now you are ready to create a Voximplant client instance. To do so,
import VoxImplantSDK to your swift class and create an instance of VIClient as shown below:
Connect to the Voximplant cloud and login
To create a client instance and to connect,
import VoxImplantSDK to your swift class. Also, your class should support the
On the class initialization, create a Voximplant client instance and declare your class as a session delegate for the client instance (see the code example below). Then call the connect method to connect to the cloud.
Refer to this code example to understand the login process:
Start implementing functionality
Now you have your application and SDK set up and successfully connected to the Voximplant cloud. To start implementing desired functionality, such as calls, conferences, messages, and more, go to the Guides section of our documentation and pick the features you need.
iOS SDK demos
Implement the desired functionality by following step-by-step Guides or download and test our latest iOS SDK here:
Audio call: Demonstrates the basic voice call functionality of the Voximplant iOS SDK.
Audio call with CallKit: Demonstrates the CallKit integration with the basic voice call functionality of the Voximplant iOS SDK.
Video call: Demonstrates the basic video call functionality of the Voximplant iOS SDK.
Video call with CallKit: Demonstrates how to integrate CallKit with the basic video call functionality of the Voximplant iOS SDK.
Messaging: Demonstrates how to create your web and mobile messaging client based on the Voximplant SDKs.