はじめに
このプラグインのインストール手順とフル マークダウン ガイドを含むセットアップの質問をコピーできます。
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 セットアップを使用してプラグインをインストールできます。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 セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
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
「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 がアップストリームで変更されたときに、再度同期を実行してください。
「Getting Started」から続けてください。
「Getting Started」から続けてください。あなたが「Getting Started」を使用してダッシュボードと __CAPGO_KEEP_0__ の作業を計画している場合、__CAPGO_KEEP_0__ を接続してください。 「@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-persistent-account」 「@API/__CAPGO_KEEP_1__-persistent-account」で使用するネイティブ機能の説明 Using @capgo/capacitor-persistent-account for the native capability in Using @capgo/capacitor-persistent-account, 「API Overview」 「API Overview」 導入 導入の実装詳細のために API キー API キーの実装詳細のために、 デバイス 実装詳細のためにデバイス