Effects iOS
Effects / Guides / Runtime parameters / iOS

Control Nosmai effect parameters on iOS

Updated August 27, 2026

Read the controls authored into the active effect package, update numeric or text values, and avoid hard-coded parameter assumptions.

Prerequisites

  • A working iOS quickstart
  • An active effect package that declares runtime parameters

Read the authored controls

Query parameters only after the package apply completion succeeds:

NSArray<NSDictionary *> *parameters =
    [[NosmaiSDK sharedInstance] getEffectParameters] ?: @[];

for (NSDictionary *parameter in parameters) {
  NSLog(@"%@ (%@): %@", parameter[@"displayName"],
        parameter[@"type"], parameter[@"currentValue"]);
}

Each dictionary can include name, type, displayName, description, currentValue, defaultValue, hasRange, minValue, maxValue, and options. Treat name as an opaque package contract.

Update a value

Use the parameter's declared type. Replace the placeholder with a name returned by getEffectParameters for the active package:

BOOL updated = [[NosmaiSDK sharedInstance]
    setEffectParameter:@"AUTHORED_PARAMETER_NAME"
                 value:0.5f];

BOOL textUpdated = [[NosmaiSDK sharedInstance]
    setEffectParameter:@"AUTHORED_TEXT_PARAMETER_NAME"
           stringValue:@"Hello"];

Clamp numeric values to the declared range when hasRange is true. A NO result means the active package did not accept that name, type, or value.

Verify the update

Read the numeric value back with getEffectParameterValue: and confirm the preview changes without reapplying the package. Apply another package and query again; controls belong to the active package and may change completely.

Common errors

SymptomCauseFix
The parameter list is emptyNo compatible package is active, or the package declares no controlsWait for successful package application and query again
The setter returns NOThe name or value type does not match the package metadataUse the exact returned name and the matching numeric or string setter
A slider jumps outside its intended rangeThe app ignored hasRange, minValue, or maxValueBuild the control from the returned metadata and clamp before setting

Next steps

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