Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu iOS
Reference

iOS API reference

Look up the public NosmaiCameraSDK 3.0.4 lifecycle, camera, effects, Cloud Filters, beauty, output, and game APIs.

Platform iOS SDK version 3.0.4 Updated Aug 22, 2026 Time 12 min

Entry points

TypePurpose
NosmaiSDKPrimary camera, processing, package, background, local catalog, cache, and off-screen API
NosmaiCameraCamera attachment, capture lifecycle, switching, focus, exposure, zoom, torch, and recording
NosmaiEffectsEngineEffects, Cloud Filters, games, beauty, makeup, runtime parameters, and pipeline state
NosmaiCoreHigh-level initialization, status, photo capture, recording, pause, resume, and diagnostics

Import the umbrella header:

#import <NosmaiCameraSDK/Nosmai.h>

Initialize and process

APIResult
+[NosmaiSDK initWithLicense:]Creates the process-wide SDK or returns nil when startup is rejected
+[NosmaiSDK sharedInstance]Returns the initialized shared instance
-[NosmaiSDK configureCameraWithPosition:preset:]Configures the internal camera before processing
-[NosmaiSDK setPreviewView:]Attaches or detaches the preview container
-[NosmaiSDK startProcessing]Starts camera-frame processing
-[NosmaiSDK stopProcessing]Stops processing without destroying the instance
-[NosmaiSDK cleanup]Releases SDK resources; create a new instance before reuse

Use NosmaiDelegate to observe state, errors, detected faces, filters, external frame completion, and license-status changes.

Apply and clear packages

APINotes
applyEffect:completion:Applies a readable local .nosmai package asynchronously
applyEffectSync:error:Synchronous variant; avoid calling it on a latency-sensitive UI path
setFilter: / clearFilterControls the filter slot
setAREffect: / clearAREffectControls the AR-effect slot
removeAllFiltersClears filter packages
removeAllEffectsClears the complete effect pipeline
getEffectParametersReturns parameters authored by the active package
setEffectParameter:value:Updates a numeric parameter by its authored name
setEffectParameter:stringValue:Updates a text parameter by its authored name
getEffectParameterValue:Reads a numeric value; a missing value returns NAN

Local and Cloud Filters

Use getFilters, getFiltersOfType:, getLocalFilters, getLocalEffects, getLocalBackgrounds, getLocalBeautyEffects, and getLocalGames for local discovery. Cloud operations use getCloudFiltersWithOptions:, downloadCloudFilter:progress:completion:, isCloudFilterDownloaded:, getCloudFilterLocalPath:, and removeCloudFilter:.

Pass the unchanged downloaded local path to applyEffect:completion:. A cloud record identifier is not a filesystem path.

Beauty, makeup, and backgrounds

The SDK exposes skin smoothing, whitening, sharpening, teeth whitening, brightness, contrast, RGB, hue, white balance, HSB, eye colour, makeup layers, and signed reshape controls. Manual backgrounds use setBackgroundBlurEnabled:, setBackgroundBlurStrength:, setBackgroundImage:, setBackgroundColor:, setBackgroundVideo:, and their matching clear methods. Check isBeautyEffectEnabled, isCloudFilterEnabled, and isAdvancedFiltersEnabled before exposing gated controls.

Games and media

  • isGameReady, sendGameTapAtNormalizedX:y:, sendGameInput:x:y:value:, pauseGame, resumeGame, and restartGame control an active game package.
  • capturePhoto: returns processed image data through the high-level core.
  • startRecording and stopRecording manage processed recording.
  • setCVPixelBufferCallback: exposes processed output; use the off-screen APIs for an app-owned streaming pipeline.

Threading and ownership

Perform preview and camera UI work on the main thread. Keep one active camera owner. Serialize package mutations instead of applying and clearing from multiple queues at once. Stop or finalize media work before cleanup.

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved