Swift

Adding the Vonage Video SDK

You can add the Vonage Client SDK Video iOS by adding the https://github.com/vonage/vonage-video-client-sdk-swift.git repository as a Swift Package Dependency.

To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL.

Add camera and microphone access using Info.plist Values

  1. In the left navigator panel, click your project file to open the project editor. Make sure your app target (not tests) is selected.

  2. Switch to the Build Settings tab.

  3. Search for Info.plist Values.

  4. Locate the following keys and set their values:

    • Privacy - Camera Usage Description
      $(PRODUCT_NAME) uses the camera.

    • Privacy - Microphone Usage Description
      $(PRODUCT_NAME) uses the microphone.

These values will be included in the app's generated Info.plist at build time and are required when requesting camera and microphone access.

Import the Vonage Video library.

  • In Xcode, create a new file VonageVideoManager.swift and at the beginning of the file, add a line to import the Vonage video library: