iCal (basic read and write).
Changes due to switching from CalendarStore to EventKit SDK:
- removed
calendar.notescalendar.type“IMAP” (CalCalendarTypeIMAP)calendar.isEditableevent.dateStamprecurrenceRule.recurrenceEnd.usesEndDate
-
added
calendar.immutablecalendar.allowsContentModificationscalendar.subscribedevent.lastModifiedDateevent.creationDaterecurrenceRule.weeksOfTheYearrecurrenceRule.daysOfTheYearrecurrenceRule.setPositions
status:=iCal_Request_permisson
For this command to work, the main app (4D) must be signin your app with the com.apple.security.personal-information.calendars entitlement and have the NSCalendarsUsageDescription property list key.
status:=iCal QUERY EVENT (options)
Parameters for options
startDate: TEXT or DATEendDate: TEXT or DATEcalendars: COLLECTION of calendar objects. each object must have auidortitleproperty
If status.success, a collection of events will be returned in status.events[].
status:=iCal GET CALENDAR LIST
If status.success, a collection of objects will be returned in status.calendars[].
status:=iCal Get default calendar
Retutns the default calendar and the list of available sources. You can use one of them to create a new calendar.
status:=iCal Create calendar(options)
options: Sepcify a calendar title. By default, a “Local” type is created. You can optinally pass a source title, type or identifier in source. A source identifier or type must match exactly. ? and * are allowed as wildcard characters for title.
status:=iCal Set calendar property(options)
options: Spepcify a calendar by its uid or title. Only the title and coler are modifiable.
status:=iCal Get calendar property(options)
status:=iCal Remove calendar(options)
options: Sepcify a calendar by its uid or title.
calendar properties
uid: read only TEXTcolor: LONGINT (see below)type: read only TEXT (ee below )title: TEXTsubscribed: read only BOOLEANimmutable: read only BOOLEANallowsContentModifications: read only BOOLEANnotes: TEXT Deprecated (3.2.0)isEditable: read only BOOLEAN Deprecated (3.2.0)
Notes
uidis mapped tocalendarIdentifiercolorseems to be “write only” for some calendars.typecan be Local, CalDAV, Exchange, Subscription, Birthday. “IMAP” is Deprecated (3.2.0)
status:=iCal Set event property(options)
status:=iCal Get event property(options)
status:=iCal Create event(options)
status:=iCal Remove event(options)
event properties
uid: read only TEXTstartDate: TEXT or DATEendDate: TEXT or DATEtitle: TEXTlocation: TEXTnotes: TEXTurl: TEXTcalendar: OBJECTtimeZone: read only OBJECTrecurrenceRule: OBJECTisAllDay: BOOLEANisDetached: read only BOOLEANoccurrence: read only TEXTcreationDate: read only TEXTdateStamp: read only TEXTalarms[]: read only COLLECTION (see below)attendees[]: read only COLLECTION (see below)
Notes
isAllDayis mapped toallDayurlis mapped toURLoccurrenceis mapped tooccurrenceDatedateStampis mapped tolastModifiedDatealarmsis currently read-only.
TODO: addAlarm:, removeAlarm:
it is not possible to add attendees with Event Kit
alarm properties
action: read only TEXTemailAddress: read only TEXTsound: read only TEXTurl: read only TEXT Deprecated (3.2.0)relativeTrigger: read only REALabsoluteTrigger: read only DATE
Notes
soundis mapped tosoundNamerelativeTriggeris mapped torelativeOffsetabsoluteTriggeris mapped toabsoluteDateactionis mapped totype. It can be Sound, Display, Email, Procedure.
attendee properties
isCurrentUser: read only BOOLrole: read only TEXTtype: read only TEXTstatus: read only TEXTcommonName: read only TEXTaddress: read only TEXT
Notes
isCurrentUseris mapped tocurrentUserroleis mapped toparticipantRoletypeis mapped toparticipantRolestatusis mapped toparticipantStatuscommonNameis mapped tonameaddressis mapped toURL
recurrenceRule properties
recurrenceInterval: LONGINTfirstDayOfTheWeek: LONGINTrecurrenceType: LONGINTrecurrenceEnd: OBJECTrecurrenceEnd.usesEndDate: read only BOOLEAN Deprecated (3.2.0)recurrenceEnd.endDate: DATErecurrenceEnd.occurrenceCount: LONGINTdayOfTheWeek: LONGINT Deprecated (3.2.0)weekOfTheMonth: LONGINT Deprecated (3.2.0)daysOfTheWeek[]: COLLECTION of numbersdaysOfTheMonth[]: COLLECTION of numbersnthWeekDaysOfTheMonth[]: read only COLLECTION of objects Deprecated (3.2.0)monthsOfTheYear[]: COLLECTION of numbersweeksOfTheYear[]: COLLECTION of numbersdaysOfTheYear[]: COLLECTION of numberssetPositions[]: COLLECTION of numbers
status properties
success: BOOLEANerror: OBJECT (ifsuccessisfalse)error.code: LONGINTerror.localizedDescription: TEXTerror.localizedRecoverySuggestion: TEXT