Prerequisites
- A working iOS quickstart
- A downloaded
.nosmaipackage and its required resources
Add the package resources
Add one folder under the Xcode target's nosmai_filters bundle directory:
nosmai_filters/heart_face/ heart_face.nosmai heart_face_manifest.json heart_face_preview.png
Confirm target membership and Copy Bundle Resources. The package name and companion filenames must use the same base name.
Discover and apply it
NSArray<NosmaiFilterInfo *> *filters =
[[NosmaiSDK sharedInstance] getFilters];
NosmaiFilterInfo *filter = filters.firstObject;
[[NosmaiSDK sharedInstance]
applyEffectInfo:filter
completion:^(BOOL success, NSError *error) {
if (!success) NSLog(@"Apply failed: %@", error.localizedDescription);
}];
Use the returned typed item and asynchronous completion. Do not construct a bundle path in production UI.
Verify it worked
Disable network access after license verification and apply the item again. The bundled package should remain available.
Common errors
| Symptom | Fix |
|---|---|
getFilters is empty | Check the exact nosmai_filters directory and target membership |
| Preview is missing | Include the matching external preview file |
| Apply fails | Verify package compatibility and inspect the completion error |