Skip to content

@capgo/capacitor-persistent-uuid

Persistent app UUID for Capacitor.

The Persistent UUID plugin creates a random RFC 4122 UUID once and stores it with native persistence. Use it when your app needs a stable, app-scoped identifier that can survive app reinstall flows, Android Studio reinstall cycles, app updates, and device OS updates.

  • getId - Read the stored UUID, creating one if none exists for the selected scope.
  • resetId - Rotate the UUID for logout, account reset, privacy reset, or test cleanup flows.
  • scope - Use a stable namespace when debug and production builds use different package identifiers but should share one identifier.
PlatformStorageDefault scope
AndroidAccountManager account owned by the plugin authenticatorApp package name
iOSKeychain generic password, device-only accessibilityBundle identifier
WeblocalStorage fallbackweb

This is not a hardware identifier. It does not survive factory reset, manual account removal, Keychain clearing, browser storage clearing, or an explicit resetId call.

MethodDescription
getIdRead or create the persistent UUID for a scope.
resetIdReplace the stored UUID for a scope.
getPluginVersionReturn the native plugin version marker.

This reference is synced from src/definitions.ts in capacitor-persistent-uuid.

Keep going from @capgo/capacitor-persistent-uuid

Section titled “Keep going from @capgo/capacitor-persistent-uuid”

If you are using @capgo/capacitor-persistent-uuid to identify an app install across reinstall flows, connect it with Getting Started for install and usage, Android behavior for AccountManager details, iOS behavior for Keychain details, Using @capgo/capacitor-persistent-uuid for the tutorial, and @capgo/capacitor-persistent-account when you need to persist account data instead of an identifier.