Effects iOS
Effects / Reference / API reference / iOS
Updated August 27, 2026

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

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, 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 downloaded Cloud Filter 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

Cloud Filters

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

Standard beauty strengths use 0.0...1.0; signed reshape controls use -1.0...1.0; contour, highlighter, lipstick, and blusher support 0.0...2.0. Values are clamped and are not interpreted as percentages.

APIContract
setBeautyVisible: / isBeautyVisibleHides or restores built-in beauty without clearing its configured values. AR packages and backgrounds remain visible.
applyFaceContour:highlighter:Sets contour and highlighter independently from 0.0...2.0.
applyFreckles:Controls freckle quantity from 0.0...1.0.
applyFoundation:r:g:b: / removeFoundationUses 0.0...1.0 coverage and RGB components.
applyDarkCircleCorrector:Controls under-eye correction from 0.0...1.0.
setHairColoringEnabled:, setHairColorWithRed:green:blue:, setHairColorIntensity:, isHairColoringEnabledControls the optional hair-colour layer.

The SDK also 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.

Makeup styles and palettes

NosmaiSDK (Beauty) provides style-based applyLipstickWithStyle:, applyEyeshadowWithStyle:, applyBlusherWithStyle:, applyEyelashWithStyle:, and applyEyebrowWithStyle: methods. The coloured layers have custom RGB and palette-index overloads. Lipstick also accepts an optional UIColor.

Read lipstickColors, eyeshadowColors, blusherColors, or eyebrowColors to populate a picker. Entries are NosmaiMakeupColor objects with a display name, normalized RGB components, and uiColor. Check the selected index against the matching palette's count.

Each layer has a dedicated intensity setter, remove... method, and has... property. Lipstick and blush accept 0...2; eyeshadow, eyelashes, and eyebrows accept 0...1. removeAllMakeup removes the layers together. See Makeup styles and palettes for the exact selectors and code examples.

Face reshaping

setReshapeType:value: is available on NosmaiEffectsEngine and NosmaiSDK. The published NosmaiReshapeType values are Lip, FaceSlim, Eye, Nose, Chin, Brow, BrowThickness, Jaw, MouthWidth, and Forehead, each with the NosmaiReshapeType prefix. Use the shared signed -1...1 control range, with 0 as neutral.

reshapeValueForType: reads configured strength; hasActiveReshape reports whether any unified control is non-zero. Neither query reports face detection. Set one type to 0 or call clearReshapes for a targeted shape reset. Older helpers are not interchangeable with signed setters: applyNoseSize:0.5f is neutral, whereas the unified nose type uses 0. See Face reshaping for enum constants, directions, examples, and reset behaviour.

Runtime face stickers

Use setFaceSticker:anchor: for a UIImage, or setFaceStickerData:anchor: for encoded PNG, JPEG, or animated GIF data. The full overloads accept face-relative offsets, scale, rotation, and opacity. Update placement with setFaceStickerAnchor:offsetX:offsetY:scale:rotationDeg:opacity:, read isFaceStickerActive, and remove the sticker with clearFaceSticker. Face stickers share the AR overlay slot, so applying another AR effect replaces the active sticker.

Eye and hair colouring

NosmaiSDK (Beauty) provides setEyeColorR:g:b:, setEyeColorIntensity:, removeEyeColoring, and hasEyeColoring for the iris/contact-lens area. Sclera-colouring compatibility selectors do not enable a supported recolouring feature in this release.

Hair uses setHairColorWithRed:green:blue:, setHairColorIntensity:, and setHairColoringEnabled:; query isHairColoringEnabled. All RGB and intensity components use 0...1. Layer state does not report current face/hair detection. See Eye and hair colouring.

Active effects and events

Read currentPipelineState and observe NosmaiPipelineStateDidChangeNotification; its userInfo holds a NosmaiPipelineState under NosmaiPipelineStateUserInfoKey. Delivery is coalesced on the main thread. The effects delegate's nosmaiEffectsDidChangePipelineState: is an alternative observation route.

Use effective backgroundActive / backgroundSource rather than inferring all backgrounds from the manual config. Empty package paths do not establish that built-in beauty or a sticker is inactive. Remove notification tokens and screen-owned handlers on teardown. See Active effects and events.

Media

  • capturePhoto: returns processed image data through the high-level core.
  • Core's recording completion methods return the finalized video URL. The published Core has no recordingConfiguration setter; see Recording configuration.
  • Use Core's liveFrameStreamCallback for SDK-owned camera output, or native off-screen initialization and processFrame:mirror: for app-owned BGRA input. Low-level setCVPixelBufferCallback: is a single callback, not a broadcast subscription. Retain buffers across asynchronous consumption; see Custom frame pipelines.

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

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