始め方
セットアップのプロンプトをコピーして、インストールの手順とこのプラグインのフルマークダウンガイドを取得します。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-persistent-account`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/persistent-account/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクションbun add @capgo/capacitor-persistent-accountbunx cap syncimport { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';API の概要
Section titled “API の概要”readAccount
Section titled “readAccount”__CAPGO_KEEP_0__ を読み取ります。
保存したアカウントデータを永続ストレージから読み取ります。
import { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';
const result = await CapacitorPersistentAccount.readAccount();if (result.data) { console.log('Account data:', result.data);} else { console.log('No account data found');}saveAccount
コピーSection titled “saveAccount”
アカウントデータを永続ストレージに保存します。
import { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';
await CapacitorPersistentAccount.saveAccount({ data: { userId: '12345', username: 'john.doe', email: 'john@example.com' }});このページはプラグインから生成されています。 src/definitions.tsパブリック API がアップストリームで変更されたら、再度同期を実行してください。