# Download a Cloud Filter in React Native

> Fetch a typed cloud catalog through the React Native SDK, download one item, and apply its local package path.

> For AI agents: the complete documentation index is at https://nosmai.com/llms/effects.txt

Product: Nosmai Effects
Group: guide
Source: https://nosmai.com/docs/effects/guides/filters/download-a-cloud-filter/react-native/

## Prerequisites

- A working [React Native quickstart](/docs/effects/quickstart/react-native/)
- Cloud Filters enabled for the project

## Request the catalog

```tsx
const page = await NosmaiCameraSdk.getCloudFilters({
  packageType: 'effect',
  page: 1,
  limit: 20,
});
```

Use the typed object returned by the SDK. Do not rebuild the item from display
text.

## Download and apply

```tsx
const selected = page.filters[0];
const download = await NosmaiCameraSdk.downloadCloudFilter(selected);

await NosmaiCameraSdk.applyEffect(download.path);
```

To remove the active package, pass the same path to `removeEffect`. Keep one
Promise per cloud identifier so repeated taps share the operation.

## Handle cache eviction

Treat the downloaded URI as session/cache state, not a permanent application
asset. The cache has no documented cross-platform TTL and the operating system
can reclaim it. Re-query the SDK state when the item is selected and download
again if the local package is missing. Keep the cloud item identifier as the
durable reference.

## Verify it worked

Reopen the camera screen and use the SDK's catalog or cache state rather than a
stored temporary path.

## Common errors

| Error or symptom | Fix |
| --- | --- |
| `E_INVALID_PACKAGE_PATH` | Apply the downloader's returned path unchanged |
| Stale item updates a closed sheet | Ignore results after the component unmounts |
| Duplicate network work | Reuse the in-flight Promise keyed by cloud identifier |

## Next steps

- [Understand Cloud Filters](/docs/effects/concepts/cloud-filters/)
- [Bundle a filter in React Native](/docs/effects/guides/filters/bundle-an-asset-store-filter/react-native/)

## References

- [React Native platform guide](/docs/effects/platforms/react-native/)
