How to add calendar events from your Expo app, in short
Use expo-calendar. Install it with npx expo install expo-calendar, add it to the plugins array of app.json with a permission message, and create a development build. Then, when the user taps Add to Calendar: request calendar permission, get a calendar object, and call calendar.addEventWithForm() with the event details. The user sees the system's own Add Event screen, pre-filled, and saves it with one tap.
That one button covers most real apps: a booking app adding the appointment, an event app adding the show, a course app adding the live call. The code is short. What trips people up is the permission model, which differs between iOS and Android, and the fact that the module's API changed recently.
Step 1: Install expo-calendar and set the permission messages
- Install: npx expo install expo-calendar. Using expo install picks the version that matches your SDK.
- Add the config plugin to app.json: "plugins": [["expo-calendar", { "calendarPermission": "Allow $(PRODUCT_NAME) to add your bookings to your calendar." }]]. calendarPermission sets the iOS calendar usage description strings.
- If you only ever add events and never read the user's calendar, also set "writeOnlyAccess": true and a "writeOnlyCalendarPermission" message. That requests write-only calendar access on iOS 17 and later, and writes the NSCalendarsWriteOnlyAccessUsageDescription string instead of the full-access one.
- On Android, add "READ_CALENDAR" and "WRITE_CALENDAR" to the expo.android.permissions array in app.json if your code reads calendars or writes events.
- Make a development build. The current expo-calendar is not available in Expo Go or Snack, and the plugin options only take effect in a new native build.
Our take: write the permission message about the feature, not the API. Allow $(PRODUCT_NAME) to add your bookings to your calendar tells the user exactly what will happen. The default, Allow $(PRODUCT_NAME) to access your calendar, does not, and App Review asks that purpose strings clearly describe how the data is used. Our [guide to requesting permissions in Expo](/blog/how-to-request-permissions-in-your-expo-app) covers how plugins write these strings during a build, and our [Expo Go vs development build](/blog/expo-go-vs-development-build) post explains why some modules need the second one.
Step 2: Ask for write-only access when you only add events
Most apps never need to read someone's calendar. They need to put one event in it. iOS 17 added a permission level for exactly that: write-only access, which lets your app create events without seeing existing calendars or events. Request it by passing true: const { granted } = await Calendar.requestCalendarPermissions(true). Inside a component you can use the hook instead: const [status, requestPermission] = Calendar.useCalendarPermissions({ writeOnly: true }).
Which permission each job needs
| What you want to do | iOS | Android |
|---|---|---|
| Add an event the user confirms | Write-only access is enough | Calendar permission, to get a writable calendar |
| Add an event silently | Write-only access is enough | WRITE_CALENDAR |
| List the user's calendars or events | Full access | READ_CALENDAR |
| Let the user choose a calendar | Full access (presentPicker is iOS only) | Build your own list from getCalendars() |
| Create a separate calendar for your app | Full access (write-only cannot create calendars) | WRITE_CALENDAR |
The writeOnly flag only means something on iOS, so a cross-platform call looks like Calendar.requestCalendarPermissions(Platform.OS === 'ios'). Ask at the moment the user taps the button, not on launch. A prompt that appears right after the user asked to save their booking makes sense to them. One that appears on the splash screen gets denied.
Step 3: Get a calendar to write to
In the class-based API, events are created through a calendar object, so you need one first. This is where the platforms split.
- iOS: const calendar = Calendar.getDefaultCalendarSync(). It returns the user's default calendar. With write-only access it returns a virtual calendar that can create events but does not expose any existing data, which is exactly what an Add to Calendar button needs.
- Android: there is no system default calendar, and getDefaultCalendarSync is not available. Call const calendars = await Calendar.getCalendars(), keep the ones where allowsModifications is true, and prefer one with isPrimary set. calendars.find(c => c.isPrimary && c.allowsModifications) with a fallback to the first writable calendar is a sensible default.
If the user has several accounts on Android, the primary calendar of the first account is not always the one they use. For a one-tap button it is fine, because the next step shows the native form and the user can change the calendar there before saving.
Step 4: Open the native Add Event screen
Call const result = await calendar.addEventWithForm({ title, startDate, endDate, location, notes }). It presents the system dialog for creating an event in that calendar, pre-filled with your data. startDate and endDate accept a Date or a date string, and there are also allDay, recurrenceRule, and on iOS, alarms and url.
What addEventWithForm resolves to
| Field | iOS | Android |
|---|---|---|
| action | 'saved', 'canceled' or 'deleted' | Always 'done' |
| id | The new event's ID when the user saves and permission is granted, otherwise null | Always null |
That Android row matters. Android does not report whether the user saved or cancelled, so do not show an Added to your calendar toast based on the result there. Our take: on iOS, store the returned id if you want to open or update the event later; on Android, treat the button as fire-and-forget and word any confirmation as Opened your calendar.
Why the form instead of writing directly? The user sees exactly what is being added, can change the time, calendar and alerts, and stays in control of their own calendar. It also means fewer support emails about duplicate events, because nothing lands in the calendar without a tap.
Step 5: When you really need to write events directly
Some features need to write without a form, like syncing a whole class schedule or keeping a booking in step after it is rescheduled. For those, call const event = await calendar.createEvent({ title, startDate, endDate, location, notes, alarms: [{ relativeOffset: -30 }] }). relativeOffset is in minutes from the start date, so -30 is a reminder 30 minutes before. It resolves to an ExpoCalendarEvent.
- Recurring events: pass recurrenceRule: { frequency: Calendar.Frequency.WEEKLY, occurrence: 10 } for a weekly event that repeats 10 times, or set endDate inside the rule instead of occurrence.
- Changing it later: event.update({ startDate, endDate }) updates the event, and event.delete() removes it. Save the event's id in your own data so you can find it again.
- Showing it: event.openInCalendar() opens the system view of the event, and event.editInCalendar() opens the system editor.
- Reading: Calendar.listEvents(calendars, startDate, endDate) searches events across calendars. On iOS this needs full access, so only use it if your feature genuinely depends on the user's schedule.
Our take: if you write directly, give the user a clear switch in Settings and a way to remove everything you added. Silently filling someone's calendar is the fastest route to an uninstall.
Have Claude Code build it for you
Open your project in the Claude Code desktop app and be specific, because AI-written calendar code often uses the old createEventAsync and getCalendarsAsync calls (which now throw), requests full calendar access on launch, and assumes a default calendar exists on Android. A prompt that avoids all three:
Then add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) such as "Calendar access goes through src/lib/calendar.ts; class-based expo-calendar API, write-only on iOS, always via addEventWithForm" so a later session keeps the rules. Test on a real iPhone and a real Android phone, including denying permission, because the form behaves differently on each. Our guide to [debugging an Expo app on a device](/blog/how-to-debug-expo-app-on-device) covers getting a development build onto a phone. If your app is on an older SDK, our [Expo SDK upgrade guide](/blog/how-to-upgrade-your-expo-sdk-version) covers moving forward, and the legacy import keeps old calendar code running while you port it.
The short version
To add calendar events from your Expo app: install expo-calendar, set a specific permission message in the config plugin, and make a development build. Request write-only access on iOS 17+, get the default calendar on iOS or a writable one from getCalendars() on Android, and call addEventWithForm so the user confirms the event. Use createEvent only when you truly need to write silently, and never trust the Android result to tell you whether the user saved.
If you are building your first iOS app with Claude Code and Expo and want feedback on it before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the [curriculum](/curriculum) covers the full path from first build to first users. If you are adding more native features, our guides to [push notifications](/blog/how-to-add-push-notifications-to-your-expo-app) and [contacts](/blog/how-to-access-contacts-in-your-expo-app) follow the same pattern. Join at applaunchclub.co for $9 a month.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
How do I add an event to the calendar in Expo?
Install expo-calendar, request calendar permission, get a calendar object (Calendar.getDefaultCalendarSync() on iOS, a writable calendar from Calendar.getCalendars() on Android), then call calendar.addEventWithForm() with the title, start date and end date. The user confirms the event in the native Add Event screen.
Why does createEventAsync throw an error in Expo?
In the current SDK, the function-style methods on the root expo-calendar import, including createEventAsync, getCalendarsAsync and createEventInCalendarAsync, are deprecated and throw at runtime. Use the class-based API, such as calendar.createEvent() and calendar.addEventWithForm(), or import the old functions from expo-calendar/legacy.
Does expo-calendar work in Expo Go?
The current class-based expo-calendar is not available in Expo Go or Snack, so you need a development build. The legacy API imported from expo-calendar/legacy is included in Expo Go.
What is write-only calendar access on iOS?
On iOS 17 and later, an app can ask for permission to add events without reading the user's existing calendars or events. In Expo, set writeOnlyAccess: true in the expo-calendar config plugin and call Calendar.requestCalendarPermissions(true). It cannot create, update or delete calendars, and reading events needs full access.
How do I know if the user saved the calendar event?
On iOS, addEventWithForm resolves with action 'saved', 'canceled' or 'deleted', plus the event id when saved. On Android, the action is always 'done' and the id is always null, so you cannot tell whether the user saved it.
Why is getDefaultCalendarSync not working on Android?
It is iOS only, because Android has no single system default calendar. On Android, call Calendar.getCalendars() and choose a calendar where allowsModifications is true, using isPrimary to prefer an account's main calendar.
How do I add a reminder alert to a calendar event in Expo?
Pass alarms when you create the event, for example alarms: [{ relativeOffset: -30 }] for an alert 30 minutes before the start. relativeOffset is in minutes from the start date, and negative values fire before it.
Last reviewed by David on October 30, 2026

