# Migrate to Nosmai Effects

> Move from the legacy Camera SDK repositories and Flutter package to the current Nosmai Effects releases without changing native ownership twice.

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

Product: Nosmai Effects
Group: get-started
Source: https://nosmai.com/docs/effects/migrate-to-nosmai-effects/

## Prerequisites

- Commit or archive a known-good release build.
- Record the current native binary, wrapper, package ID, bundle identifier, and
  CocoaPods lockfile.
- Keep the active Nosmai license key private and bound to the same signed app.

## Replace legacy distribution names

| Legacy | Current |
| --- | --- |
| `https://github.com/nosmai/camera-sdk-android` | `https://github.com/nosmai/nosmai_effects_sdk_android` |
| `https://github.com/nosmai/camera-sdk-ios` | `https://github.com/nosmai/nosmai_effects_sdk_ios` |
| `https://github.com/nosmai/nosmai_camera_sdk_flutter` | `https://github.com/nosmai/nosmai_effects_sdk_flutter` |
| Flutter `nosmai_camera_sdk` | Flutter `nosmai_effects_sdk` |
| No official React Native release | `@nosmai/react-native-effects-sdk` stable `1.0.0` |

The stable iOS CocoaPod remains named `NosmaiCameraSDK`. That pod name is not a
legacy repository reference and must not be renamed in the consuming Podfile.

## Upgrade one layer at a time

1. Replace the Android AAR with verified `3.0.4`, or update the iOS pod to
   `NosmaiCameraSDK ~> 3.0.4`.
2. Clean and build the native application before changing a wrapper.
3. Replace the Flutter dependency with `nosmai_effects_sdk: ^1.0.2`, or install
   React Native `1.0.0` documented for the host framework.
4. Resolve CocoaPods and inspect `Podfile.lock` for one Nosmai native version.
5. Remove duplicate legacy AARs, frameworks, pods, and package imports.

## Preserve the application contract

Keep the signed Android application ID and iOS bundle identifier unchanged
unless the Console project is also updated. Preserve one camera owner, await
initialization before rendering the preview, and pass cloud download results
back through the public local-path API instead of constructing service URLs.

For Flutter, change imports from the old package name to:

```dart
import 'package:nosmai_effects_sdk/nosmai_effects_sdk.dart';
```

Public class names remain `NosmaiFlutter` and `NosmaiCameraPreview` in `1.0.2`.

## Verify the migration

1. Build a signed release for each supported platform.
2. Confirm the final license status becomes valid without exposing the key.
3. Exercise preview lifecycle and camera switching repeatedly.
4. Apply local, cloud, background, beauty, and game packages used by the app.
5. Capture, record, and test the app's streaming handoff.
6. Compare signed binary size, memory, FPS, and thermal behavior with the saved
   baseline.

## Common errors

| Symptom | Cause | Fix |
| --- | --- | --- |
| Duplicate native symbols or classes | Both legacy and current native binaries are packaged | Keep exactly one AAR or one iOS distribution path |
| Flutter import cannot be resolved | Source still imports `nosmai_camera_sdk` | Update the dependency, import, and lockfile together |
| License becomes invalid after migration | The signed application identity or selected platform changed | Match the Console project to the actual release identity |

## Next steps

- [Review current releases](/docs/effects/releases-and-compatibility/)
- [Install on Android](/docs/effects/installation/android/)
- [Install on iOS](/docs/effects/installation/ios/)
- [Install on Flutter](/docs/effects/installation/flutter/)
- [Troubleshoot the migration](/docs/effects/troubleshooting/)

## References

- [Android repository](https://github.com/nosmai/nosmai_effects_sdk_android)
- [iOS repository](https://github.com/nosmai/nosmai_effects_sdk_ios)
- [Flutter repository](https://github.com/nosmai/nosmai_effects_sdk_flutter)
- [React Native repository](https://github.com/nosmai/nosmai_effects_sdk_react_native)
