跳过内容

iOS行为

GitHub

在iOS上,插件将UUID存储在Keychain中作为一个通用密码项。该项仅在设备上使用,并使用包标识符作为默认范围。

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.

稳定范围规则

标题:稳定范围规则

当包标识符稳定时,使用默认范围。

const result = await PersistentUuid.getId();

当多个构建变体应解析为一个应用标识符时,使用自定义范围。

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

UUID 可能会丢失,如果用户擦除设备、清除 Keychain 数据、更改 Keychain 访问权限、更改包/团队访问权限或应用调用 resetId。

继续从 iOS 行为

标题:继续从 iOS 行为

如果您正在验证iOS持久性,请将此页面连接到 Getting Started 为API使用, Android行为 为Android重新安装行为, 使用@capgo/capacitor-persistent-uuid 进行完整的教程。