설치 간 지속성
데이터는 앱 제거/재설치 주기에서 유지됩니다 💾
Capacitor Persistent Account 플러그인은 앱 설치 간에 사용자 계정 데이터의 안전한 저장 및 지속성을 가능하게 합니다. 이 플러그인은 앱 재설치 후에도 사용자 계정 정보를 사용할 수 있도록 하여 원활한 사용자 경험과 계정 연속성을 제공합니다.
설치 간 지속성
데이터는 앱 제거/재설치 주기에서 유지됩니다 💾
안전한 저장소
시스템 통합을 통한 안전한 계정 데이터 저장 🔐
간단한 API
계정 관리를 위한 깔끔한 읽기/쓰기 인터페이스 📊
크로스 플랫폼
네이티브 iOS 및 Android 구현 📱
npm install @capgo/capacitor-persistent-accountnpx cap syncsaveAccount(options: { data: unknown }) - 계정 데이터를 영구 저장소에 안전하게 저장합니다readAccount() - 저장된 계정 데이터를 검색하고, Promise<{ data: unknown | null }>을 반환합니다import { PersistentAccount } from '@capgo/capacitor-persistent-account';
// 계정 데이터 구조 정의interface UserAccount { userId: string; username: string; email: string; preferences: { theme: string; notifications: boolean; };}
// 계정 데이터 저장const accountData: UserAccount = { userId: '12345', username: 'john_doe', email: 'john@example.com', preferences: { theme: 'dark', notifications: true }};
await PersistentAccount.saveAccount({ data: accountData });
// 계정 데이터 읽기const result = await PersistentAccount.readAccount();if (result.data) { const account = result.data as UserAccount; console.log('복원된 계정:', account.username);} else { console.log('계정 데이터를 찾을 수 없음');}자세한 구현 가이드 및 모범 사례는 전체 문서를 확인하세요.