Zoom SDK Integration for iOS — Swift

Hey all, I have a hope that you were tired of searching Zoom SDK integration iOS in swift. Because, even me. 😜

In the Zoom marketplace documentation, they have mentioned it for Objective-C. So I have planned to give you the Swift version.

I’m taking you to do the topic directly. I don’t want to explain the documentations. I have another hope that you might read that before itself. Well, my hope may fail. But I don’t want that. 😝

Initial Setup

1. Project Setup

  1. If you don’t want to test this demo app on the iOS device, you can skip the above step. I prefer you to do :)
  2. Else you can continue the testing in the simulator itself.

2. Download the Zoom SDK

3. Add Zoom SDK into you iOS project

2. Drag and Drop the file into the project folder

4. Now, you have to do two things:

i) Go to General -> Frameworks, Libraries and Embedded Content and change embed type to Embed & Sign

ii) Go to Build Settings-> Build Options and enable Bitcode to No

4 . Delete SceneDelegates

  1. Application Scene Manifest from the info.plist file

2. SceneDelegate.swift file

3. UISceneSession Lifecycle methods from the AppDelegate.Swift and declare UIWindow

Run you app

Everything is fine, you wont get any error at this stage.

Creating Zoom Account

Build your SDK app

After login into the marketplace, you have options to build your app

Build your SDK app

  1. Create SDK app and fill all details

2. After creating, you will get the SDK Key and SDK Secret

3. Add you keys into the project

Authenticate Zoom SDK

func setupSDK(_ sdkKey: String?, sdkSecret: String?) {
let context = MobileRTCSDKInitContext()
context.domain = "zoom.us"
context.enableLog = true
let sdkInitSuc = MobileRTC.shared().initialize(context)
if sdkInitSuc {
let authService = MobileRTC.shared().getAuthService()
if let authService = authService {
authService.clientKey = sdkKey
authService.clientSecret = sdkSecret
authService.delegate = self

We have MobileRTCAuthDelegate to handle errors.

extension AppDelegate :MobileRTCAuthDelegate{func onMobileRTCAuthReturn(_ returnValue: MobileRTCAuthError) {switch returnValue {case MobileRTCAuthError_Success:
print("SDK successfully initialized.")
case MobileRTCAuthError_KeyOrSecretEmpty:
print("SDK key/secret was not provided. Replace sdkKey and sdkSecret at the top of this file with your SDK key/secret.")
case MobileRTCAuthError_KeyOrSecretWrong:
print("SDK key/secret is not valid.")
case MobileRTCAuthError_Unknown:
print("SDK key/secret is not valid.")
print("SDK Authorization failed with MobileRTCAuthError: \(returnValue)")

Am done with it. 🙌

Run you app

Everything is fine, you wont get any error at this stage and you have successfully integrated Zoom SDK into your iOS project.

Am planning to write another article regarding how to do join & start meeting within your iOS App. Stay turned 💪

Cheers 🍻

 iOS Developer @nfnlabs, Chennai. Here to share best practices learned through my experience. Reach me on https://www.linkedin.com/in/ashokkumar-b-26026913a/