Is it possible to modify CalDAV / CardDav accounts with an app on iOS?

1k Views Asked by At

I was wondering if there is an API for modifying CalDAV and CardDAV accounts on iOS. I am developing an app and I want to make it possible for the user to simply enable and disable calendar / contact synchronisation without setting it up manually in the iOS settings. I know that I can bring my own CalDAV / CardDav implementation and synchronize it using EventKit / address book api, but I want to avoid this kind of implementation, because it will be much more difficult and error-prone than using the default CalDav / CardDAV implementation of iOS.

Thank you very much in advance for your answers.

1

There are 1 best solutions below

1
On

Not entirely sure what you are trying to do.

  1. Create New calDAV/cardDAV account. - A server-side action.
  2. Subscribe to an existing calDAV/cardDAV account - Use Settings App on device.
  3. Create events/people with a subscribed account - Can do this in you app.

From the Docs:

Event Kit provides limited access to a user’s Calendar database; it does not include everything that would be desired for implementing a full-featured calendar or reminder app, such as adding attendees or accounts.

Thus, that's a NO for calDAV.

The docs for AddressBook are not as prescriptive, however, knowing the way that Apple likes to give the user ultimate control over anything at the account level I suspect the same if true for cardDAV.

However, there is facility to add calDAV and cardDAV accounts in the Settings App. This would appear to be your only option for subscribing to new accounts.