Search code examples
iphonecocoa-touchioseventkit

iOS: Event Kit with custom event source (from web/ICS)?


I am looking into using event kit to display calendar events to our users, but I am trying to find a way to source the events from our website, since we already have thousands of events in our system.

Is there a way to have event kit use a .ics file from the web as a source? Or any other way to pull the data from another server?


Solution

  • Actually there is, and it is quite simple... Create an IBAction and use the following code:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://addressToYourics.ics"]];
    

    And that it is. There will be an confirmation if the user wants to set the new calandar, and thats it.