[Update: I submitted an official Apple Developer feedback request for an update to the EventKit API and documentation]
[Update: I contacted Apple Support and they said to read the docs...so I think Matt is correct, It is simply not available.]
According to Apple Docs, the EKReminder is a subclass of EKCalendarItem. It has the following (lot) of properties:
As a reminder:
- priority: Int - The reminder's priority.
- startDateComponents: DateComponents? - The start date of the task.
- dueDateComponents: DateComponents? - The date by which the reminder should be completed.
- isCompleted: Bool - A Boolean value determining whether or not the reminder is marked completed.
- completionDate: Date? The date on which the reminder was completed.
As a calendar item:
- title: String! -The title for the calendar item.
- location: String? - The location associated with the calendar item.
- creationDate: Date? - The date that this calendar item was created.
- lastModifiedDate: Date? - The date that the calendar item was last modified.
- timeZone: TimeZone? - The time zone for the calendar item.
- url: URL?
- hasNotes: Bool - A Boolean value that indicates whether the calendar item has notes.
- notes: String? - The notes associated with the calendar item.
- hasAttendees: Bool - A Boolean value that indicates whether the calendar item has attendees.
- attendees: [EKParticipant]? -The attendees associated with the calendar item, as an array of EKParticipant objects.
I can print any one of these items from reminders in my app.
However, if I create a reminder that is "assigned to a person", I cannot get that information. I know it must be stored somewhere.
If you "print" a reminder, you get something like this:
EKReminder <0x0000000> {title = Do the thing; dueDate = 2021-02-25 08:00:00 +0000; completionDate = (null); priority = 0; calendarItemIdentifier = XXXXX-XXXX-XXXX-XXXX-XXXXXX; alarms = (null)}
If you want, you can "print" any of the other items, like print(reminder.notes!)
.
I thought shared items and assignments might use the attendees
property, but it is nil - even when the reminder has an assigned person.
How can you get to the assigned person?