Platform SDKs / iOS (Swift)
iOS (Swift)
Install and configure the Nosmai SDK in a native iOS app.
Install
Install via CocoaPods — add the pod to your Podfile and run pod install. The SDK and its bundled models come with the pod; everything runs on-device with no external dependencies.
pod 'NosmaiModerationSDK', '~> 1.0'
Configure
Initialize once with your license key, off the main thread — it verifies the key online (cached 24h, +24h offline grace) and loads the models.
import NosmaiDetection
DispatchQueue.global(qos: .userInitiated).async {
let ok = NosmaiSDK.initialize(licenseKey: "NOSMAI-XXXX")
}
Requirements
- iOS 14.0 or later,
arm64 NSCameraUsageDescriptionin Info.plist for live moderationITSAppUsesNonExemptEncryption=NOin Info.plist — the SDK only encrypts its own bundled models locally (export-compliance exempt); without it App Store uploads stall on the encryption question
NOTE
Next: Moderation · iOS — image, video, text and live usage.