__CAPGO_KEEP_0__ Reference
이 플러그인에 대한 설치 단계와 전체 마크다운 가이드를 포함한 설정 프롬프트 복사하기.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-calendar`
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/calendar/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.
설치
설치 섹션npm install @capgo/capacitor-calendarnpx cap synciOS 설정
iOS 설정 섹션 제목앱이 필요한 사용 설명을 추가하세요. ios/App/App/Info.plist:
<key>NSCalendarsUsageDescription</key><string>This app needs calendar access.</string><key>NSCalendarsWriteOnlyAccessUsageDescription</key><string>This app needs permission to add calendar events.</string><key>NSCalendarsFullAccessUsageDescription</key><string>This app needs permission to read and manage calendar events.</string><key>NSRemindersUsageDescription</key><string>This app needs reminders access.</string><key>NSRemindersFullAccessUsageDescription</key><string>This app needs permission to read and manage reminders.</string>iOS 17 이상은 쓰기 전용 및 전체 캘린더 접근 권한을 구분합니다. 사용자 설명이 포함된 경우 Reminders API를 호출하는 앱만 사용하세요.
Apple 참조: 최신 캘린더 접근 권한으로 마이그레이션.
Android 설정
Android 설정 섹션 제목앱이 필요한 캘린더 권한을 추가하세요. android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.READ_CALENDAR" /><uses-permission android:name="android.permission.WRITE_CALENDAR" />Android 참조: 일정 제공자 사용 권한.
일정 접근 요청
'일정 접근 요청' 제목import { CapacitorCalendar } from '@capgo/capacitor-calendar';
const permission = await CapacitorCalendar.requestFullCalendarAccess();
if (permission.result !== 'granted') { throw new Error('Calendar permission was not granted');}일정만 추가하는 앱에 사용 requestWriteOnlyCalendarAccess()Android 전용 읽기 흐름에 사용 requestReadOnlyCalendarAccess().
일정 만들기
'일정 만들기' 제목날짜는 밀리초 단위의 Unix 타임스탬프입니다.
import { CapacitorCalendar } from '@capgo/capacitor-calendar';
const startDate = Date.now() + 60 * 60 * 1000;const endDate = startDate + 60 * 60 * 1000;
const { id } = await CapacitorCalendar.createEvent({ title: 'Product review', location: 'Capgo', startDate, endDate, description: 'Created with @capgo/capacitor-calendar',});
console.log('Created event', id);네이티브 이벤트 편집기를 열기
'네이티브 이벤트 편집기를 열기' 제목await CapacitorCalendar.createEventWithPrompt({ title: 'Planning session', location: 'Office', startDate: Date.now() + 24 * 60 * 60 * 1000, endDate: Date.now() + 25 * 60 * 60 * 1000,});안드로이드에서, 프롬프트 기반으로 생성 및 수정 호출은 null생성된 이벤트 ID를 찾기 위해 필요할 경우 나중에 이벤트 목록을 표시합니다.
미래의 이벤트 목록
‘미래의 이벤트 목록’이라는 제목의 섹션const now = Date.now();const oneWeekFromNow = now + 7 * 24 * 60 * 60 * 1000;
const { result: events } = await CapacitorCalendar.listEventsInRange({ from: now, to: oneWeekFromNow,});iOS에서 시스템 캘린더 픽커를 표시하고 싶을 때 사용할 수 있는 캘린더를 선택하세요.
‘iOS 캘린더 선택’이라는 제목의 섹션const { result: calendars } = await CapacitorCalendar.listCalendars();const { result: defaultCalendar } = await CapacitorCalendar.getDefaultCalendar();
const calendarId = defaultCalendar?.id ?? calendars[0]?.id;selectCalendarsWithPrompt() iOS에서 시스템 캘린더 픽커를 표시하고 싶을 때 사용할 수 있는 iOS 알림을 생성하세요.
‘iOS 알림 생성’이라는 제목의 섹션
iOS에서 시스템 캘린더 픽커를 표시하고 싶을 때 사용할 수 있는 iOS 알림을 생성하세요.const permission = await CapacitorCalendar.requestFullRemindersAccess();
if (permission.result === 'granted') { await CapacitorCalendar.createReminder({ title: 'Send launch notes', dueDate: Date.now() + 2 * 24 * 60 * 60 * 1000, notes: 'Created with @capgo/capacitor-calendar', });}Reminder API는 iOS 전용입니다.
예제 앱
예제 앱 섹션저장소에는 Capacitor 예제 앱이 포함되어 있습니다. 이 앱에는 권한 확인, 이벤트 생성, 네이티브 이벤트提示, 캘린더 목록, 이벤트 범위 목록이 포함되어 있습니다.
| iOS | Android |
|---|---|
![]() | ![]() |
API 참조
API 참조 섹션API 참조는 패키지 README 및 TypeScript 정의에서 완전하게 유지됩니다.

