__CAPGO_KEEP_0__ - __CAPGO_KEEP_1__ 앱의 실시간 업데이트

Getting Started

GitHub

Capgo의 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-supabase` plugin in my project.

만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래에 플랫폼에 따라 설명된 지침을 따르세요.

터미널 창
npm install @capgo/capacitor-supabase
npx cap sync

안드로이드 최소 SDK

안드로이드 최소 SDK 섹션

안드로이드 구현은 Android 8.0 이상이 필요합니다. 설정 minSdkVersion = 26 in android/variables.gradle.

import { CapacitorSupabase } from '@capgo/capacitor-supabase';
await CapacitorSupabase.initialize({
supabaseUrl: 'https://your-project.supabase.co',
supabaseKey: 'your-anon-key',
});
const { session, user } = await CapacitorSupabase.signInWithPassword({
email: 'user@example.com',
password: 'password123',
});
console.log('User', user?.id);
console.log('JWT available', Boolean(session?.accessToken));
const listener = await CapacitorSupabase.addListener('authStateChange', ({ event, session }) => {
console.log('Auth event', event);
console.log('Current JWT available', Boolean(session?.accessToken));
});
await listener.remove();

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__
import { createClient } from '@supabase/supabase-js';
const { session } = await CapacitorSupabase.getSession();
const supabase = createClient('https://your-project.supabase.co', 'your-anon-key', {
global: {
headers: {
Authorization: `Bearer ${session?.accessToken}`,
},
},
});
const { data } = await supabase.from('table').select('*');
console.log(data);

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__
const { data, error } = await CapacitorSupabase.select({
table: 'users',
columns: 'id, name, email',
filter: { active: true },
limit: 10,
orderBy: 'created_at',
ascending: false,
});
console.log(data, error);
__CAPGO_KEEP_6__
  • __CAPGO_KEEP_7__
  • __CAPGO_KEEP_8__ @supabase/supabase-js.
  • __CAPGO_KEEP_9__

Getting Started에서 계속 진행하세요

Getting Started에서 계속 진행하세요

native 플러그인 작업을 계획하고 있다면 Getting Started native 플러그인 작업을 계획하고 있다면 Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리에서 제품 워크플로우 Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, __CAPGO_KEEP_1__ native 플러그인 구현 세부 사항 __CAPGO_KEEP_0__ 플러그인 구현 세부 사항을 확인하세요, Ionic Enterprise Plugin Alternatives의 제품 워크플로우에 대해 Capgo 네이티브 빌드 Capgo 네이티브 빌드의 제품 워크플로우에 대해