Wednesday Jun 17, 2009

Configuring CalDAV on iPhone 3.0 for Sun Calendar Server

The next release of Sun Calendar Server will be CalDAV-based. It is codenamed "Project Aries". We have a beta instance running internally, and with some tinkering, it can work on iPhone 3.0.

To configure for Sun's CalDAV Server:

  1. Go to Settings > Mail, Contacts, Calendars
  2. Tap "Add Account...", then "Other"
  3. Under Calendars, "Add CalDAV Account"
  4. Enter account information:
    • Server: [cal.domain.com]
    • User Name: [your username]
    • Password: [your password]
    • Description: [e.g aries]
  5. Tap "Next"

Here, if your CalDAV server is configured only on SSL, you might get a "Cannot Connect Using SSL" error. Just ignore and tap Save. Then edit the new CalDAV account, go into "Advanced Settings", change the port from 8443 to 443, and fix the Account URL to this format: https://cal.domain.com/davserver/dav/principals/[username]/ (don't forget the trailing slash).

Also see this entry by Arnaud on setting up against non-production CalDAV servers.

Configuring LDAP on iPhone 3.0

[Cannot Connect Using SSL]Another new feature in iPhone 3.0 software update is a built-in LDAP client. Previously, a third-party app such as Directory or LDAPeople is required.

To configure LDAP:

  1. Go to Settings > Mail, Contacts, Calendars
  2. Tap "Add Account...", then "Other"
  3. Under Contacts, "Add LDAP Account"
  4. Enter account information:
    • Server: ldap.company.com
    • User Name: [e.g. cn=First Last (employee ID), ou=people, dc=company,dc=com]
    • Password: [your password]
    • Description: [e.g. book]
  5. Tap "Next"

Unfortunately, it doesn't work with Sun's book.sun.com. It gives a "Cannot Connect Using SSL" error. A reader already reported that this could be due to lack of ca-cert three months ago so looks like this might be an open iPhone bug.

Come to think of it, this could be an underlying OS X bug. Using the Address Book app in OS X 10.5 configured for book.sun.com, if "Allow self-signed certificates" is checked, lookup works; if it is unchecked, lookup fails, even though book.sun.com has a legitimate chained cert with Versign as CA.

In the meantime, if you want to use LDAPS on iPhone 3.0, the workaround is to buy a third-party app.


[UPDATE Jun 23, 2009] Bug ID# 7000490 filed with Apple.

Configuring CalDAV on iPhone 3.0 for Google Calendar

Today, the iPhone 3.0 software update finally came out and about the first thing I did after upgrading mine was to check out the new CalDAV and LDAP functionalities.

This is how I configured CalDAV for Google Calendar:

  1. Go to Settings > Mail, Contacts, Calendars
  2. Tap "Add Account...", then "Other"
  3. Under Calendars, "Add CalDAV Account"
  4. Enter account information:
    • Server: www.google.com
    • User Name: [your username]
    • Password: [your password]
    • Description: [e.g. Personal]
  5. Tap "Next"

That's it! Now you can launch the Calendar app, tap "Calendars", then select the CalDAV calendar. Events can be created or modified on the iPhone and they'll be reflected on the server instantly.

Secondary calendars: This only shows the main calendar. To get your other calendars, you'll need to repeat the above for each (with distinct Descriptions otherwise it'll be confusing), then edit that CalDAV account, and under "Advanced Settings" change the "Account URL". You can get this Account URL by clicking the down arrow next to your calendar at calendar.google.com and selecting "Calendar Settings". You should find your Calendar ID next to the XML, iCal, HTML links in the Calendar Address section. Insert this Calendar ID into an URL like so: https://www.google.com/calendar/dav/ccogk69iprl3zyfa1ijeep0oj5@group.calendar.google.com/user . You can email this to yourself, then leverage the new copy&paste feature of 3.0 to avoid typos. Why is this so cumbersome? Here's a possible explanation.

Offline access: Works in both directions. Changes are sync'd upon network reconnection.

CalDAV or Google Sync? Either way will give you read/write access to your Google Calendar. A major deciding factor is whether you already have an active Exchange account (e.g. for work), since iPhone only allows one Exchange account at any time, and Google Sync uses Exchange ActiveSync protocol.

[Updated per suggestions in the comments]

About

I currently live in San Francisco Bay Area. For the past seven years, I have been designing and building messaging solutions for Sun.

Search

Categories
Archives
« June 2009 »
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today