v-modal/vmodal_sdk_swift_iphoneduo
V-Modal Visual Search SDK optimized for IOS Swift and Iphone DUO
VModal SDK for Apple platforms (Swift)
What it is – An open‑source Swift package that lets iOS and macOS apps talk to the VModal cloud service. The service provides AI‑powered, multimodal video search (semantic, speech‑to‑text, OCR, image‑based) and upload/ indexing capabilities. The SDK handles authentication, request/response models, streaming uploads, progress reporting, cancellation, and typed results, while keeping the UI completely in the developer’s app.
Key capabilities
- Semantic video & image search – Find moments by natural‑language description, spoken words, on‑screen text, or visual objects.
- ASR & OCR indexing – The backend extracts speech and text from uploaded videos, making them searchable.
- Streaming uploads – Upload large video files directly from a
URLwithout loading the whole file into memory; progress is exposed via anAsyncStreamand can be cancelled. - Scoped organization – Projects, collections, and streams are identified by simple strings (
projectID,collectionName,streamName). All operations are scoped to a specific collection/stream. - Runtime API‑key handling – Supply a bearer token at runtime, rotate it, or clear it without rebuilding the app; the SDK never shows a login UI.
- Swift‑native API – Fully typed, async/await‑compatible, works with Swift 6.0 and Xcode 26.6+, targeting iOS 16+ and macOS 13+.
Typical usage flow
- Add the package in Xcode via the URL
https://github.com/v-modal/vmodal_sdk_swift_iphoneduo. - Configure a project with an API key:
let keys = try MutableAPIKeyProvider("runtime-api-key") let project = try VModal.configure(projectID: "my_app", apiKeyProvider: keys) let scope = try project.scope(collectionName: "user_42", streamName: "uploads") - Upload a video:
let source = try UploadSource(fileURL: videoURL) let task = scope.upload(source) for await p in task.progress { print("\(p.percent)%") } let result = try await task.result - Search with natural language or metadata:
let results = try await scope.search( "cyclist in red jacket crossing the bridge", options: ScopedSearchOptions(searchSources: ["image"], limit: 20) ) - Handle cancellation – Call
task.cancel()or cancel the async search task when the view disappears.
Examples & tooling
- StarterIOS – A minimal app that demonstrates configuration, collection discovery, upload, indexing, and search.
- Framebase example – Shows how to browse a local video archive, prepare it, and play search results.
- SDKSimulation tool – Simulates each integration stage for debugging.
- Docs – Full API reference and getting‑started guide are generated with DocC (
Sources/VModalSDK/VModalSDK.docc).
Supported platforms
- iOS (SwiftUI or UIKit) – ✅
- macOS – ✅
- watchOS, tvOS, visionOS – ❌ (not in this release)
- Other platforms – ❌ (use the corresponding VModal SDK for those environments)
Prerequisites
- Swift 6.0, Xcode 26.6 or newer
- iOS 16+ / macOS 13+
- A VModal API key (request via https://v-modal.com/page/contact.ts)
Development workflow
git clone https://github.com/v-modal/vmodal_sdk_swift_iphoneduo.git
cd vmodal_sdk_swift_iphoneduo
bash install.sh check # verify toolchain & dependencies
bash build.sh analyze # static analysis
bash test.sh test # unit tests (offline)
# For live integration tests (requires credentials)
bash test.sh live
The repo also provides helper scripts to list simulators, pick a device, and launch the example app.
License – MIT.
Bottom line – If you need to add AI‑driven video search or searchable video uploads to an Apple app, VModal’s Swift SDK gives you a small, type‑safe wrapper around the VModal cloud service, handling all the heavy‑lifting (vector indexes, speech‑to‑text, image recognition) on the backend while you stay in pure Swift/SwiftUI.
Related
- Project
- Project
- Project
- Project