Calendar Integration
As part of the Liquid Core API, integration with the native iOS calendar is easy. The following fields are expected to be the item:
Mandatory Fields
- startDateTime
- endDateTime
- title
- appleEventId
- this is so the client database can store the apple generated event ID
Optional Fields
- location
- reminder (dimension field)
- /Data/alert[AtTimeOfEvent]
- /Data/alert[5MinBefore]
- /Data/alert[15MinBefore]
- /Data/alert[30MinBefore]
- /Data/alert[1HourBefore]
- /Data/alert[2HourBefore]
- /Data/alert[1DayBefore]
- /Data/alert[2DaysBefore]
LDMCalendarManager has only 1 method you need to worry about. But before we do that, we have to determine which calendar the class will write to. This can be set with NSUserDefaults with the key: "defaultCalendar". This way you can manually present UI to the user to choose between calendars if there are many. If that variable is empty when a calendar entry is created, the application will choose a default calendar for you. To add a calendar event for your item:
- (void)addOrUpdateActivityInCalendar:(LDMItem*) item withCompletionHandler:(void (^)(BOOL success))completionHandler;