The CalendarEvent
API enables users to create, manage, and interact with events in iOS calendars. This API supports various features such as setting event details, managing recurrence rules, inviting attendees, and handling event actions.
EventParticipant
Represents an attendee of an event:
isCurrentUser: boolean
: Indicates if the attendee is the current user.name?: string
: The attendee's name.role: ParticipantRole
: The attendee's role in the event.type: ParticipantType
: The type of participant.status: ParticipantStatus
: The attendee's attendance status.ParticipantRole
Roles for event participants:
"chair"
"nonParticipant"
"optional"
"required"
"unknown"
ParticipantType
Types of participants:
"group"
"person"
"resource"
"room"
"unknown"
ParticipantStatus
Attendance statuses:
"unknown"
"pending"
"accepted"
"declined"
"tentative"
"delegated"
"completed"
"inProcess"
EventEditViewAction
Actions taken after editing an event:
"deleted"
"saved"
"canceled"
CalendarEvent
identifier: string
: Unique identifier for the event.calendar: Calendar
: The calendar associated with the event.title: string
: The event title.notes?: string
: Additional notes for the event.url?: string
: The URL associated with the event.isAllDay: boolean
: Whether the event lasts all day.startDate: Date
: Start date and time of the event.endDate: Date
: End date and time of the event.location?: string
: The event's location.timeZone?: string
: The time zone for the event.attendees?: EventParticipant[]
: List of attendees.recurrenceRules?: RecurrenceRule[]
: Recurrence rules for the event.hasRecurrenceRules: boolean
: Indicates if the event has recurrence rules.addRecurrenceRule(rule: RecurrenceRule): void
removeRecurrenceRule(rule: RecurrenceRule): void
remove(): Promise<void>
save(): Promise<void>
presentEditView(): Promise<EventEditViewAction>
CalendarEvent.getAll(startDate: Date, endDate: Date, calendars?: Calendar[]): Promise<CalendarEvent[]>
CalendarEvent.presentCreateView(): Promise<CalendarEvent | null>
timeZone
property is set when dealing with events across different time zones to prevent scheduling conflicts.attendees
property can be used to manage participants. Each attendee is represented by an EventParticipant
object that includes details such as name, role, and attendance status.