시작하기
설치 명령어와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트 복사
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”저장된 계정 데이터를 영구 저장소에서 읽습니다.
이전으로 저장된 계정 데이터를 읽습니다. 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
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이 업스트림에서 변경될 때 다시 싱크를 실행하세요.