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. 😝

Creating Xcode project

  1. Register your app ID and create the provisioning profiles.
  2. 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 :)
  3. Else you can continue the testing in the simulator itself.

You can do download Zoom SDK official website.

  1. Select MobileRTC framework and MobileRTCResources bundle files from the downloaded Zoom SDK folder

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

Currently, Zoom doesn’t support this. It might give you an error. So, I recommended you to delete the followings:

  1. Application Scene Manifest from the info.plist file

2. SceneDelegate.swift file

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

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

You can create Zoom account here.

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

You have to authenticate the SDK keys. Add the following method into the AppDelegate.swift file

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. 🙌

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 and Flutter developer @TCS, Chennai. Here to share best practices learned through my experience. Reach me on www.linkedin.com/in/ashok1208