
Eventkit
Create, read, and manage calendar events and reminders using EventKit and EventKitUI.
Install
npx skills add dpearson2699/swift-ios-skills --skill eventkit -g -a claude-code -y- Repository
- dpearson2699/swift-ios-skills1.3k
- Category
- Engineering
- Updated
- 3mo ago
- License
- See repository
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Create, read, and manage calendar events and reminders using EventKit and EventKitUI. Use when adding events to the user's calendar, creating reminders, setting recurrence rules, requesting calendar or reminders access, presenting event editors, choosing calendars, handling alarms, observing calendar changes, or working with EKEventStore, EKEvent, EKReminder, EKCalendar, EKRecurrenceRule, EKEventEditViewController, EKCalendarChooser, or EventKitUI views.
EventKit
Use EventKit for calendar and reminder authorization, CRUD, recurrence, alarms, and system editors.
Contents
- Availability
- Setup
- Authorization
- Creating Events
- Fetching Events
- Reminders
- Recurrence Rules
- Alarms
- EventKitUI Controllers
- Observing Changes
- Common Mistakes
- Review Checklist
- References
Availability
- iOS 17+: Use granular full/write-only request methods; legacy
requestAccess(to:)no longer prompts and throws. The system event editor can create an event without app calendar access. For iOS 10, 16, guard those APIs, use the legacy request plusNSCalendarsUsageDescription/NSRemindersUsageDescription; EventKitUI may also needNSContactsUsageDescription. - iOS 26+: The typed
EKEventStore.EventStoreChanged/.changedmessage is available behind a guard. KeepEKEventStoreChangedfor earlier systems.
Setup
Info.plist Keys
Add the usage description for the access path selected in Authorization. Do not request broader access merely to simplify the setup path.
The authorization-free system editor path needs no calendar usage string. Direct writes need write-only or full access; reads need full access. Reminders have only full access.
Event Store
Create a single EKEventStore instance and reuse it. Do not mix objects from
different event stores.
import EventKit
let eventStore = EKEventStore()
Authorization
Request the narrowest access that matches the feature. Apply the versioned request path in Availability.
