The following sections describe installation and setup of the Voice SDK:
- Create an iOS project
- Integrate the Voice SDK
- Enable VoIP capabilities
- Build and run
- Push notification setup
To use the Voice SDK you need:
- Xcode (14.3.1 or later)
- Swift (5.8.1 or later)
- iOS (15.5 or later)
- Supported architectures (arm64, x86_64)
To get started, create an iOS project using the following steps:
- Open Xcode and click Create a new Xcode project
- Select Single View App as the template and click Next
- Choose the folder where to store the project and click Create
- Go to the TARGETS > Project Name > General > Signing menu and select Automatically manage signing
- Click Enable Automatic on the displayed pop-up window
To integrate the Voice SDK:
Go to SDK Releases and download the latest version of the Voice SDK for iOS.
Unzip the downloaded Voice SDK package.
You should have the following contents from the extracted
- Copy the
Wavecell.xcframeworkbundle to the Frameworks folder as shown:
- Go to the menu at TARGETS > Project Name > General > Frameworks, Libraries, and Embedded Content:
- Drag the
Wavecell.xcframeworkbundle from the
Frameworksfolder into the
Frameworks, Libraries, and Embedded Contentsection.
To enable VoIP capabilities:
- Go to TARGETS > Project Name > Signing & Capabilities and then add Background Modes.
You can also enable Audio, AirPlay Voice over IP and other attributes while in this directory.
- Go to TARGETS > Project Name > Info and add your privacy description for push notification usage.
Note: This step is only required for receiving incoming calls.
- Go to TARGETS > Project Name > Info and add your privacy description for microphone usage.
NSMicrophoneUsageDescription property describes the reason your app needs to access the phone microphone. When the system prompts the user to allow access, this string is displayed as part of the alert. Therefore, it cannot be left empty.
After you have completed the previous integration tasks, you can verify if your app can invoke functions from the
Wavecell.xcframework by doing the following:
AppDelegate.swiftby adding the following lines:
import Wavecell print("\(VoiceSDK.shared.version())")
Build (Cmd+B) and Run (Cmd+R) the app project
If successful, your Xcode console displays the following type of message:
The 8x8 backend solution includes the notification server. The notification server establishes secure connection with APNS in order to send push notifications to your application.
There are two types of secure connections:
The backend supports both types of secure connections.
For the certificate-based type of connection, generate VoIP Service Certificate
with your Apple developer account:
- When the
certificateis ready, click Download and save it to your local drive (
voip_services.cerfile with the Keychain Access app on your computer.
Select the login option if you are asked which keychain to add the certificate to.
In the Keychain Access app, select the Certificates option in the bottom section of the left sidebar.
You will now need to find the certificate you have created.
Export your Certificate as a
.p12file to a
.pemfile using the Terminal
openssl pkcs12 -in PATH_TO_YOUR_P12 -nokeys -out cert.pem -nodes openssl pkcs12 -in PATH_TO_YOUR_P12 -nocerts -out key.pem -nodes openssl rsa -in key.pem -out key.pem cat cert.pem key.pem > apns-voip-services.pem
Register the Certificate (
apns-voip-services.pemfile) with your Wavecell developer account.
For the token-base connection you will need to generate a key in your Apple developer
Apple Push Notification Service enabled:
Once the key is ready click Download and save it to your hard drive (
Key(.p8 file) in your Wavecell developer account.
Updated 2 months ago