컨텐츠로 바로가기

Getting Started

GitHub

설치

설치

AI-Assisted 설치를 사용하여 플러그인을 설치할 수 있습니다. 다음 명령어를 사용하여 Capgo 기능을 AI 도구에 추가하세요:

터미널 창
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-account
bunx cap sync
import { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';

계정 데이터를 영구 저장소에서 읽습니다.

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');
}

계정 데이터를 영구 저장소에 저장합니다.

제공된 계정 데이터를 플랫폼에 맞는 보안 저장소 메커니즘을 사용하여 저장합니다. 데이터는 앱 세션을 넘어 가고 앱 재설치 시에도 살아남습니다. 기존의 계정 데이터는 덮어씌워집니다.

import { CapacitorPersistentAccount } from '@capgo/capacitor-persistent-account';
await CapacitorPersistentAccount.saveAccount({
data: {
userId: '12345',
username: 'john.doe',
email: 'john@example.com'
}
});

이 페이지는 플러그인에서 생성됩니다. src/definitions.ts. Re-run the sync when the public API changes upstream.

Getting Started로 계속 진행하세요.

Getting Started라는 섹션 제목입니다.

만약 __CAPGO_KEEP_0__를 사용하고 있다면 Getting Started를 사용하여 API와 대시보드의 연동을 위해 연결하세요. @capgo/capacitor-persistent-account를 사용하여 @capgo/capacitor-persistent-account를 사용하는 native capability에 대해 API Overview API Overview의 구현 세부 사항에 대해 소개 소개의 구현 세부 사항에 대해 API 키 API 키의 구현 세부 정보를 위한 키 장치 장치의 구현 세부 정보를 위한 키