Getting Started
インストールステップとこのプラグインの全てのマークダウンガイドを含むセットアップの案内をコピーしてください。
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.
インストール
「インストール」と題されたセクションAI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを使用してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-persistent-account` plugin in my project.Manual Setup を好む場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム固有の手順に従ってください。
bun add @capgo/capacitor-persistent-accountbunx cap syncインポート
「インポート」のセクションimport { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';API の概要
「API の概要」のセクションreadAccount
「readAccount」のセクションアカウントデータを永続ストレージから読み取ります。
saveAccount() を使用して以前保存したアカウントデータを読み取ります。データはアプリのセッションをまたがって保存され、サポートされているプラットフォームでアプリを再インストールしてもデータは残ります。
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
アカウント情報を永続ストレージに保存プラットフォーム固有の安全なストレージメカニズムを使用して、提供されたアカウントデータを保存します。 アプリのセッションをまたいで、再インストールを乗り越えてデータが保存されます。 既存のアカウントデータは上書きされます。
クリップボードにコピー
import { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';
await CapacitorPersistentAccount.saveAccount({ data: { userId: '12345', username: 'john.doe', email: 'john@example.com' }});Getting Started から続けて src/definitions.ts. Re-run the sync when the public API changes upstream.
アカウント情報を保存する場合に使用
アカウント情報を保存する場合に使用アカウント情報を保存する場合に使用 スタート APIと連携するためにダッシュボードとAPIの運用を計画する @capgo/capacitor-persistent-accountを使用する native capabilityの@capgo/capacitor-persistent-accountの使用方法 APIの概要 APIの実装詳細 導入 __CAPGO_KEEP_0__の実装詳細 APIのキー APIの実装詳細 デバイス __CAPGO_KEEP_0__の実装詳細