Integrate SDK into Your App
The Zoom Video SDK allows you to add real-time voice, video and chat capabilities to your app.
Prerequisites
- Xcode version 16.1 or later required.
- A macOS device running 10.15 or newer. For macOS 26 and Xcode 26 or later, you may need to remove the "-ld_classic" in other link flags from your project.
- Valid SDK Credentials.
Set up development environment
Open your project in Xcode and select the current target.
- Set macOS deployment target to macOS 10.15 or later.
- For the Intel package, set the target of your app project with
Always embed swift standard librariesset toYES.
Note: Video SDK for macOS does not support running in a sandbox environment.
Import the SDK library
Download the Video SDK if you haven't already done so. The downloaded folder includes SDK libraries and a sample app. The SDK libraries are in the following folders, depending on the CPU that you'd like to support:
Sample-Libs/ZoomVideoSDK
Select your project and navigate to the Build Phases tab. Open Link Binary With Libraries and ensure that only the following five (5) SDK files are present:
libcrypto.dyliblibjson.dyliblibminizip.dyliblibssl.dylibZMVideoSDK.framework
After adding the SDK files, navigate to the Build Phases tab. All files should be added to the Copy Files step with a Destination set to Frameworks. Ensure that no code sign on boxes are checked. If there are additional phases containing the SDK files (for example, Copy Bundle Resources), they can be safely removed from those phases.
Note
If you required to share computer audio, navigate to the Plugins folder and follow the instructions in the
readme_for_audiodriver_vsdk.txtfile. Next, addZoomAudioDevice.driverto the Copy Files step with a Destination set to Plugins and Foundation Extensions and ensure that no code sign on boxes are checked.
If you get SDK file issues, navigate to your project's Build Settings and ensure that your Runpath Search Paths contains @executable_path/../Frameworks and your Framework Search Path contains the right path where you copied the library files.
Add required project permissions
The Video SDK requires the following permissions:
| Permission | Required / Optional | Permission Key | Description |
|---|---|---|---|
| Camera | Required | Privacy - Camera Usage Description | Required for Video |
| Microphone | Required | Privacy - Microphone Usage Description | Required for Audio |
| AppleEvent | Required | Privacy - AppleEvents Sending Usage Description | Required for Apple Events |
To grant permissions to the SDK, open the info.plist for your project and click the + (plus) button to add the three (3) required permissions.
Initialize the SDK
SDK Initialization is required before calling any other functions of the SDK. To initialize the SDK, create an instance of ZMVideoSDKInitParams object and set the domain to zoom.us. Optionally, you may also enable logging for debugging.
Note that you must call the Video SDK from the main thread.
let initParams = ZMVideoSDKInitParams()
initParams.domain = "https://zoom.us"
initParams.enableLog = true
ZMVideoSDKInitParams *initParams = [[ZMVideoSDKInitParams alloc] init];
initParams.domain = @"https://zoom.us";
initParams.enableLog = YES;
Verify initialization
After creating your ZMVideoSDKInitParams object with the domain, call the initialize function on the SDK and verify that it was correctly initialized.
private func setupSDK() {
let initParams = ZMVideoSDKInitParams()
initParams.domain = "https://zoom.us"
initParams.enableLog = true
let sdkInitReturnStatus = ZMVideoSDK.shared().initialize(initParams)
switch sdkInitReturnStatus {
case ZMVideoSDKErrors_Success:
print("SDK initialized successfully")
default:
print("SDK failed to initialize: \(sdkInitReturnStatus)")
}
}
ZMVideoSDKErrors ret = [[ZMVideoSDK sharedVideoSDK] initialize:initParams];
switch (ret) {
case ZMVideoSDKErrors_Success:
NSLog(@"SDK initialized successfully");
break;
default:
NSLog(@"SDK failed to initialize with error code: %lu", (unsigned long)ret);
break;
}
Once the SDK is successfully initialized, you will be able to call the SDK functions. You will also be able to set up a delegate to listen for events such as when a user joins a session or leaves a session.
Initialize with debug log
You can enable the debug log feature when initializing the SDK with the enableLog variable and also add your own log file prefix with the logFilePrefix variable.
let initParams = ZMVideoSDKInitParams()
initParams.domain = "https://zoom.us"
initParams.logFilePrefix = "ZoomSDK"
initParams.enableLog = true
ZMVideoSDKInitParams *initParams = [[ZMVideoSDKInitParams alloc] init];
initParams.domain = @"https://zoom.us";
initParams.logFilePrefix = @"ZoomSDK";
initParams.enableLog = YES;
Once you've initialized the log feature, the SDK creates an encrypted .log file at ~/Library/Logs/yourappname. The log file has a 5MB fixed maximum storage capacity. Once it reaches the maximum capacity, it automatically recreates another log file. The crash log is at ~/Library/Logs/DiagnosticReports/yourappname. See the Apple Developer article, Acquiring crash reports and diagnostic logs, for details.
Create a listener delegate
The ZMVideoSDKDelegate of the Video SDK allows you to subscribe to callback events that provide status updates on the operations performed in your app that are related to the SDK. For example, you might want to be notified when a user has successfully joined or left a session.
Implement a delegate
To subscribe to these events, you must create an instance of the ZMVideoSDKDelegate and have your class conform to the ZMVideoSDKDelegate protocol.
See the following for how to implement this delegate and assign it to the SDK instance.
Conform to the ZMVideoSDKDelegate
ZMVideoSDK.shared()?.addListener(self)
extension YourClass: ZMVideoSDKDelegate {
}
@interface YourClass : NSObject <ZMVideoSDKDelegate>
[[ZMVideoSDK sharedZMVideoSDK] addListener:self];
Callbacks
The following example shows how to implement a callback function. You can implement additional operations as needed after receiving the result of the callback. See the documentation under Add features for each feature for callbacks relevant to the feature.
Get notified of operation results and SDK errors
func onError(_ ErrorType: ZMVideoSDKErrors, detail details: Int32) {
switch ErrorType {
case ZMVideoSDKErrors_Success:
// Your ZMVideoSDK operation was successful.
print("Success")
default:
// Your ZMVideoSDK operation raised an error.
// Refer to error code documentation.
print("Error \(ErrorType) \(details)")
return
}
}
- (void)onError:(ZMVideoSDKErrors)ErrorType detail:(int)details {
switch (ErrorType) {
case ZMVideoSDKErrors_Success:
// Your ZMVideoSDK operation was successful.
NSLog(@"Success");
break;
default:
// Your ZMVideoSDK operation raised an error.
// Refer to error code documentation.
NSLog(@"Error %lu %ld", (unsigned long)ErrorType, (long)details);
break;
}
}
Add features
See details on features and other callback functions in the Add features sections for Video, Audio, and others.
See Error codes for a list of error codes, descriptions, and troubleshooting suggestions.