Search code examples
ioseventkit

Can I add/subscribe to a calendar in EventKit?


Is it possible to add or subscribe to a whole new calendar with iPhone's EventKit?


Solution

  • yes, though only for iOS5 onwards

    http://developer.apple.com/library/ios/#documentation/EventKit/Reference/EKEventStoreClassRef/Reference/Reference.html

    - (BOOL)saveCalendar:(EKCalendar *)calendar commit:(BOOL)commit error:(NSError **)error
    

    this will save the changes you made to a calendar or will add a new calendar to the database.

    detailed step by step instructions for adding a new calendar can be found here how do I create a new EKCalendar on iOS device?