Install the UI Kit

The iOS Video UI kit contains methods that you can use to develop and integrate the video apps with the iOS platform. Before starting with the app development, download the required files and meet all other prerequisites.

Software Requirements

  • iOS 12 and later versions
  • Xcode 13 or later

Installation Procedure

The Enx_UIKit_iOS framework requires EnableX iOS SDK and socket library for developing and integrating EnableX video with native iOS apps. If you are installing the framework manually, download the iOS UI kit and add it to the Framework or Library folder under your project. If you are installing the framework through the pod, the EnableX iOS SDK and the socket library is automatically installed.

Manual Installation

The Enx_UIKit_iOS framework requires EnableX iOS SDK and socket library. Perform the following steps to manually install the iOS UI kit:

  1. Download the iOS UI Kit.

  2. Unzip the downloaded file and go to the folder containing the unzipped contents.

  3. Drag and drop the Enx_UIKit_iOS files in Target > Framework or Library of your project.

  4. Open the terminal and navigate to your project directory.

  5. Create a Podfile by running pod init.

  6. Open the Podfile in a text editor.

    1. Add the following lines to the Podfile to use the EnxRTCiOS and Socket.IO-Client-Swift release version in the production version of your app.
    pod 'EnxRTCiOS'
    pod 'Socket.IO-Client-Swift', '~> 15.0.0'
    1. Save the file.
  7. Install the pod by running pod install.

Installation through Pod

  1. Open a terminal and navigate to your project directory.
  2. Create a Podfile in your project directory by running pod init.
  3. Open the Podfile in a text editor add the below line to it to use the Enx_UIKit_iOS release version in the production version of your app.
pod 'Enx_UIKit_iOS'
  1. Install the SDK in your project by running pod install. All the dependencies are automatically installed.

Note: When installing the EnableX iOS UIKit Library through the pod, it is not required to add the EnableX iOS SDK and socket.io frameworks separately.

Define Permissions

  1. Define the permissions needed on the iOS device as shown below:
private func getPrivacyAccess(){
let vStatus = AVCaptureDevice.authorizationStatus(for: .video)
if(vStatus == AVAuthorizationStatus.notDetermined){
AVCaptureDevice.requestAccess(for: .video, completionHandler: { (granted: Bool) in
})
}
let aStatus = AVCaptureDevice.authorizationStatus(for: .audio)
if(aStatus == AVAuthorizationStatus.notDetermined){
AVCaptureDevice.requestAccess(for: .audio, completionHandler: { (granted: Bool) in
})
}
}
  1. Update your project's Info.plist to add two new entries with the following keys:
    • **NSCameraUsageDescription**
    • **NSMicrophoneUsageDescription**

For these key's values, provide user-facing strings explaining why your app is asking for camera and microphone access.

  1. Obtain a token to join an RTC session on the EnableX platform.

You need to create a token for a video room. This token has an assigned role for the user such as a participant, moderator, or viewer. For more information, see Create a Token.