[ACCEPTED]-How to Create "Add to Calendar" Link on Web Page for iPhone-vcal

Accepted answer
Score: 19

As of iOS 5, if you create a http link to 2 an .ics file, Mobile Safari will offer to 1 open it up in Calendar.

Score: 8

Note that this is a very old answer. Since 8 iOS 5 you can use EKEventStore to access calendar events 7 and Mobile Safari will open .ics files in Calendar.

Original Answer
It's 6 not possible, there is no API for the calendar 5 on the iPhone, sadly. You can build an app 4 that registers for the ical URL scheme, but 3 you still won't be able to save the calendar 2 entries to the calendar backend since there 1 is no API (like e.g. for the AddressBook).

Score: 1

One resolution could be (from iPhone OS 4 3.0):

  • estabilish a calendar server (webdav or caldav protocol), create accounts, events...
  • subscribe your iPhone Calendar to one of the accounts (eg. Settings->Mail, Contacts, Calendars->Add Account…->Other, Add CalDAV Account -> server, account details)
  • your web based app posts calendar entries into the adequate calendar server account

Alternatively use Google Calendar 3 to post entries from your website, which 2 can be easily synched to iPhone Calendar 1 using CalDAV.

Another usefull link: http://blog.fosketts.net/2009/06/17/subscribe-internet-calendars-iphone-30/

More Related questions