Installation¶
Using Zip files¶
Short integrator-oriented guide to add VeridasVideoSDK to an iOS project.
1) Download the zipped xcframework files (VeridasCommonDefinitions, VeridasCommonUtils, VeridasVideoSDK, VeridasGenuineDS, VeridasNativeDS, VeridasSDKCore), place them inside an xcframeworks/ folder in your Xcode project, add them to the target, and set each one to Embed & Sign in the target’s General settings.
Project settings (UIKit)¶
If the app is UIKit-based, disable User Script Sandboxing in Build Settings.
Prepare the configuration¶
- Provide a
VideoCaptureConfigurationinstance (it isCodable, so you can build it in code or load it from a JSON such asvideoSelfie.jsoninSdkJsonConfigs/). - Ensure permissions in
Info.plist:NSCameraUsageDescriptionandNSMicrophoneUsageDescription. - iPad only — add
UIRequiresFullScreentoInfo.plistto ensure the SDK can control the screen orientation.
Minimal code usage¶
Import the SDK, create the configuration (programmatically or from JSON), and start the flow:
import UIKit
import VeridasVideoSDK
final class MyController: UIViewController, VideoCaptureDelegate, VideoCaptureEventsDelegate {
func startVideoSelfie() {
// Decode from JSON (recommended). You can also build it in code.
let config = loadConfigFromJSON("videoSelfie", as: VideoCaptureConfiguration.self)
VideoCapture.setEventsDelegate(delegate: self)
VideoCapture.start(delegate: self, configuration: config)
}
// VideoCaptureDelegate
func onVideoCaptureResults(results: VideoCaptureResults) { print(results) }
func onVideoCaptureStarted() { print("SDK started") }
func onVideoCaptureFinished(error: VideoCaptureError?) { print(error as Any) }
// VideoCaptureEventsDelegate
func onVideoCaptureEvent(event: VideoCaptureEvent) { print(event) }
}
Optional helper to load JSON from the bundle instead of building the config inline:
private func loadConfigFromJSON<T: Decodable>(_ name: String, as type: T.Type) -> T {
guard let url = Bundle.main.url(forResource: name, withExtension: "json") else {
fatalError("Missing \(name).json in app bundle")
}
let data = try! Data(contentsOf: url)
return try! JSONDecoder().decode(T.self, from: data)
}
Example using loadConfigFromJSON inside your controller:
func startVideoSelfie() {
let config = loadConfigFromJSON("videoSelfie", as: VideoCaptureConfiguration.self)
VideoCapture.setEventsDelegate(delegate: self)
VideoCapture.start(delegate: self, configuration: config)
}
VideoCaptureDelegate covers onVideoCaptureResults, onVideoCaptureStarted, and onVideoCaptureFinished, while VideoCaptureEventsDelegate implements onVideoCaptureEvent to receive everything happening in the SDK. Details are in the API section.