CardDAV/iCloud Interface Documentation
Overview
As of version 3.0 the iAddressBook comes with a CardDAV interface that
allows you to use the iAddressBook as your personal iCloud alternative.
Instead of using Apple's iCloud to sync your contacts you can sync your
contacts into the iAddressBook and back.
Just hook up your iPhone, Android phone or macOS Addressbook to your
installation and the contacts will sync automatically between all the
connected clients. Including Photo sync of course.
The iAddressbook uses SabreDAV (http://sabre.io) as the backend interface.
Authentication and CardDAV Support must be turned on. The client can then use the same user
credentials used for login as defined in conf/auth.php
.
You can test the settings by going to your iAddressbook installation and adding /carddav.php
to the URL as follows:
http://yourdomain.com/your_address_book/carddav.php
The demo installation also has CardDAV enabled so you can try this yourself right now: http://demo.iaddressbook.org/carddav.php
Setup Instructions
- Enable CardDAV support (HINT:
$conf['carddav_enable'] = 1;
) - Enable and setup user authentication (HINT:
$conf['auth_enabled'] = 1;
)
Apache Users:
Make sure PHP is running as Apache module (and not as FastCGI application). Otherwise HTTP Basic Auth will not work and the carddav interface cannot authenticate you
- (optional) Copy
htaccess.example
to.htaccess
and adjust RewriteBase to match your URI (i.e. if your URL ishttp://mydomain.com/something/iaddressbook
set RewriteBase to/something/iaddressbook
)
http://myserver.com/iaddressbook/carddav.php
or evenhttp://myserver.com/iaddressbook/carddav.php/principals/your_username/
.
Specifying the Server URL
Clients will ask you to provide the URL to your CardDAV server. The exact syntax depends on the
abilities of the client. If you have activated the .htaccess
file that comes with the installation
you should be able to use a very simple form (i.e. such as myserver.com/iaddressbook
).
Sometimes the simple format will not work and you have to be more specific. In order to get the
right settings the following examples should guide you in finding the correct format.
Try them one by one to see which one is required.
Before you start ensure you can login using your web browser (visit: http://myserver.com/iaddressbook/carddav.php
)
- Try:
myserver.com/iaddressbook
- Try:
myserver.com/iaddressbook/carddav.php
- Try:
https://myserver.com/iaddressbook
(Make sure that you use http or https depending on your SSL support)
Setting up OSX Addressbook
(Instructions for OSX Mavericks 10.9)
- Open OSX Addressbook
- Open the settings dialog
- Select tab Accounts
- Click the (+) symbol to add a new account
- Choose “Other contacts account…” and click Continue
- Type in your User Name and Password and Server Address
- Click Create
The settings for other OSX versions might change slightly. OSX can deal with the simple form (given you have activated the shipped .htaccess file).
Setting up an iPhone running iOS 6
short: it works but the client requires you to use https://myserver.com/iaddressbook/carddav.php/principals/<username>/
- instructions follow
Setting up an iPhone running iOS 7
- Open the Settings App
- Scroll down to “Mail, Contacts, Calendars” and open it
- In the ACCOUNTS section click “Add Account”
- Select “Other”
- In the “CONTACTS” section click “Add CardDAV Account”
- Specify Server, User Name and Password and optionally change the description
- Tap Next
Setting up Android using CardDAV-Sync
- Go to the Play Store and buy/install CardDAV-Sync
- Check if you have to install this "Workaround App" (required for Samsung devices to prevent removal of your account after phone restarts)
- Once installed open the Settings Dialog
- In Section ACCOUNTS select “Add Account”
- Choose “CardDAV”
- When asked what kind of CardDAV (i.e. Google, Yahoo etc.) select the first option “CardDAV”
- Enter Server name, Username and Password then tap Next
- Set the Account Name to something more descriptive than “default” and tap Finish
- Close the “Congratulations” dialog by tapping Done