Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu iOS
How-to guide

Download a Cloud Filter in iOS

Request the iOS cloud catalog, show progress, apply the returned local package path, and reuse the cached filter.

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

Prerequisites

Request the catalog

NosmaiCloudFilterRequestOptions *options =
    [NosmaiCloudFilterRequestOptions defaultOptions];
options.page = 1;
options.limit = 20;
options.version = NosmaiCloudFilterVersion2;
options.filterType = @"effects";

[[NosmaiCore shared].effects
    getCloudFiltersWithOptions:options
                    completion:^(NSArray<NSDictionary *> *filters,
                                 NosmaiCloudFilterPaginationInfo *pagination,
                                 NSError *error) {
  if (error != nil) NSLog(@"Catalog failed: %@", error.localizedDescription);
}];

Download and apply

[[NosmaiCore shared].effects
    downloadCloudFilter:filterId
               progress:^(float progress) {
  NSLog(@"Download %.0f%%", progress * 100.0f);
} completion:^(BOOL success, NSString *localPath, NSError *error) {
  if (success && localPath.length > 0) {
    [[NosmaiCore shared].effects applyEffect:localPath completion:nil];
  }
}];

Deduplicate taps by cloud identifier and apply only the completion path.

Handle cache eviction

Use isCloudFilterDownloaded: or getCloudFilterLocalPath: at the time of selection. The cache has no documented permanent TTL and iOS can reclaim cache storage. If the package is missing, download it again and replace the old path; persist the cloud identifier rather than the filesystem location.

Verify it worked

Apply the item again from cache after turning off network access. Do not issue a new download for an already cached item.

Common errors

SymptomFix
Empty catalogCheck cloud capability, category, pagination, and request error
Download stopsPreserve the current effect, show Retry, and do not use a partial path
Apply failsPass the returned local path unchanged

Next steps

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