Skip to content

iOS Behavior

GitHub

On iOS, the plugin stores the UUID in Keychain as a generic password item. The item is device-only and uses the bundle identifier as the default scope.

This survives app updates and iOS updates. It also survives reinstall flows as long as iOS keeps the Keychain item and the app keeps compatible Keychain access through the same bundle and Apple team rules.

Use the default scope when the bundle identifier is stable.

const result = await PersistentUuid.getId();

Use a custom scope when multiple build variants should resolve to one app identifier.

const result = await PersistentUuid.getId({ scope: 'com.example.app' });

The UUID can be lost if the user erases the device, Keychain data is cleared, Keychain access changes, the bundle/team access changes, or the app calls resetId.

If you are validating iOS persistence, connect this page with Getting Started for API usage, Android behavior for Android reinstall behavior, and Using @capgo/capacitor-persistent-uuid for a complete walkthrough.