[TUTORIAL] Add native iCloud (IMAP, CardDAV, CalDav) support to WP8 GDR2 Devices!!

Search This thread

compu829

Senior Member
Nov 5, 2006
352
305
Hey guys,

I just tossed together a quick tutorial that will allow you to use the built-in IMAP, CalDav, and CardDav support in WP8 GDR2 to sync with Apple's iCloud services! This "hack" should work with any IMAP/CalDAv/CardDav accounts you may have.

*NOTE* For some reason the calendar entries are off by 5 hours (I am in the Eastern Time Zone) when compared between the windows phone and my Apple devices. Also, some ancient recurring entries in a shared calendar don't seem to come in properly for me for some reason. I am guessing the version of CalDAV on Windows Phone does not properly deal with Time Zones.

Instructions inspired by BlackBerry.com http://btsc.webapps.blackberry.com/...nisa.apps.common.BaseViewedDocsListHelperImpl

1. Go to Settings --> email +accounts --> and click "add an account"
2. Select "Google"
3. When prompted, enter a valid Gmail address and password. (we will fix this later)
4. Wait patiently for the initial sync to finish..(It may take up to 5 mins)
5. Locate the account that you created and tap on it to open the account settings...(It will be called Google, Google 2, etc).
6. Change the "Account Name" to something meaningful (I changed mine to iCloud)
7. Change the email address to the one you use for iCloud. *NOTE* If you don't use iCloud mail, enter a dummy email address here that is different from any other email address already on the device.
8. Set "download new content" to a value that you prefer. (Mine is set to every 15 mins)
9. Set "Download email from" to an appropriate value.
10. in the "content to sync" section, check which iCloud info you want to sync. (Email, Contacts, or Calendar)
11. in the "Your Name" field, enter your name.
12. If you will be using IMAP to sync with iCloud email, change the Incoming email server to "imap.mail.me.com:993", if not skip this step.
13. for the User Name, enter your iCloud user name. (Mine is my apple id because I never made an iCloud email account)
14. for the password enter your password.
15. If you will be using IMAP to sync with iCloud email, change the Outgoing email server to "smtp.mail.me.com:587", if not skip this step.
16. If you will be using IMAP to sync with iCloud email, make sure "Outgoing server requires authentication" is checked, if not skip this step.
17. For the "Contacts server (CardDAV)" enter "contacts.icloud.com".
18. for Calendar server (CalDAV)" enter "caldav.icloud.com".
19. Click the "Check" box to save your settings.
20. Check to see if things are syncing!
*NOTE* If the calendar sync is not working, it may be necessary to change you CalDAV server name to p0#-caldav.icloud.com, where # is represents the numbers 1-9. Example: p05-caldav.icloud.com or p04-caldav.icloud.com). If you don't want to experiment, there are instructions online on how to pull the right server name from Apple's Calendar app.

**EDIT** More Info on Time Zones:

1. When The Windows Phone sends the info about the event to the CalDav Server, the phone tells iCloud the event is in "Eastern Standard Time". (It should be "Eastern Direct Time" bc DST.) When the CalDAV Server correctly sends this data back to the phone, the phone processes as "Eastern Standard Time" and "bumps" the event forward an hour. The phone also doesn't send all the proper TimeZone info back to the server in the ICS file, resulting in a non-editable event in the iCloud calendar. If you Switch the displayed time zone from "Eastern Standard Time" to "Eastern Time" in the iCloud Calendar app, you can edit the event. When it comes back to the phone, it will be off by 4 hours due to the processing bug (see 2)

2. CalDAV entries that are created in iCloud come back to the device with a time zone of "US/Eastern". I am guessing there is a parsing bug in the app so that when it sees the "/", it freaks out, stops processing the TimeZone data contained in the ics file, and leaves the entry as GMT.

A couple of ways that may fix the TimeZone issue with the calendars:
1. Turn on TimeZone Support vial iCloud.com or the Calendar app. Make all your entries in the "Floating" time zone. This forces all calendar entries to be set with the "Real" time on the server and strips out TimeZone calculation.
 
Last edited:

TheInterframe

Member
Mar 5, 2013
29
4
Thanks! I have a iCloud email that I don't use, but it seems that some people I know still email there, now I don't have to boot up a old iPod touch to check that :p
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
The "off by 5 hours" issue is because Windows stores local time, and apparently expects the same; iOS probably stores GMT and applies the offset itself. Or possibly the other way around for the phone; I don't know. Would depend which way it was off.
 

compu829

Senior Member
Nov 5, 2006
352
305
I figured as much...I know that if you are dual-booting a hackintosh, you have the same issue (with the System Date and Time)...Windows expects the BIOS time to be in local time and Linux/Unix/OSX expects the BIOS time as GMT.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
There's a registry flag which supposedly "fixes" this behavior on Windows; it may work on WP8 too. The relevant key is present...
Hive: HKEY_LOCAL_MACHINE
Key: SYSTEM\CurrentControlSet\Control\TimeZoneInformation
Value: RealTimeIsUniversal
Data: 1 (DWORD)

Reboot the phone after setting that, and if needed, fix the time (it should fix automatically if it has signal from a tower or GPS). See if that helps.
 

compu829

Senior Member
Nov 5, 2006
352
305
There's a registry flag which supposedly "fixes" this behavior on Windows; it may work on WP8 too. The relevant key is present...
Hive: HKEY_LOCAL_MACHINE
Key: SYSTEM\CurrentControlSet\Control\TimeZoneInformation
Value: RealTimeIsUniversal
Data: 1 (DWORD)

Reboot the phone after setting that, and if needed, fix the time (it should fix automatically if it has signal from a tower or GPS). See if that helps.

@GoodDayToDie

I figured out what is going on with the native Calendar app (Thanks, Fiddler!). See my OP for all the info. Do you know if there is a way to report this to Microsoft? Do they Care? I did install the preview build of GDR3 before trying this experiment, so it won't be fixed in GDR3.
 
Last edited:

Alexander Man

Member
Feb 23, 2010
14
2
Apple iCloud works perfectly now!

Great news! If you use Windows Phone 8.1, there is now a iCloud setting in 'email+accounts'... Easy peasy. Email, calendar and contacts work BUT still has annoying still has time issues with calendar entries!!!
 
Last edited:
  • Like
Reactions: compu829

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
I'm sure it's *possible* to send a report, but I don't know how to go about it. Um, this sounds kind of silly, but have you tried contacting the WP8 team on social media? Sometimes that works better than one might think. There's also UserVoice (which is more about feature requests, but not a bad place for bug reports if you don't need it fixed urgently).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hey guys,

    I just tossed together a quick tutorial that will allow you to use the built-in IMAP, CalDav, and CardDav support in WP8 GDR2 to sync with Apple's iCloud services! This "hack" should work with any IMAP/CalDAv/CardDav accounts you may have.

    *NOTE* For some reason the calendar entries are off by 5 hours (I am in the Eastern Time Zone) when compared between the windows phone and my Apple devices. Also, some ancient recurring entries in a shared calendar don't seem to come in properly for me for some reason. I am guessing the version of CalDAV on Windows Phone does not properly deal with Time Zones.

    Instructions inspired by BlackBerry.com http://btsc.webapps.blackberry.com/...nisa.apps.common.BaseViewedDocsListHelperImpl

    1. Go to Settings --> email +accounts --> and click "add an account"
    2. Select "Google"
    3. When prompted, enter a valid Gmail address and password. (we will fix this later)
    4. Wait patiently for the initial sync to finish..(It may take up to 5 mins)
    5. Locate the account that you created and tap on it to open the account settings...(It will be called Google, Google 2, etc).
    6. Change the "Account Name" to something meaningful (I changed mine to iCloud)
    7. Change the email address to the one you use for iCloud. *NOTE* If you don't use iCloud mail, enter a dummy email address here that is different from any other email address already on the device.
    8. Set "download new content" to a value that you prefer. (Mine is set to every 15 mins)
    9. Set "Download email from" to an appropriate value.
    10. in the "content to sync" section, check which iCloud info you want to sync. (Email, Contacts, or Calendar)
    11. in the "Your Name" field, enter your name.
    12. If you will be using IMAP to sync with iCloud email, change the Incoming email server to "imap.mail.me.com:993", if not skip this step.
    13. for the User Name, enter your iCloud user name. (Mine is my apple id because I never made an iCloud email account)
    14. for the password enter your password.
    15. If you will be using IMAP to sync with iCloud email, change the Outgoing email server to "smtp.mail.me.com:587", if not skip this step.
    16. If you will be using IMAP to sync with iCloud email, make sure "Outgoing server requires authentication" is checked, if not skip this step.
    17. For the "Contacts server (CardDAV)" enter "contacts.icloud.com".
    18. for Calendar server (CalDAV)" enter "caldav.icloud.com".
    19. Click the "Check" box to save your settings.
    20. Check to see if things are syncing!
    *NOTE* If the calendar sync is not working, it may be necessary to change you CalDAV server name to p0#-caldav.icloud.com, where # is represents the numbers 1-9. Example: p05-caldav.icloud.com or p04-caldav.icloud.com). If you don't want to experiment, there are instructions online on how to pull the right server name from Apple's Calendar app.

    **EDIT** More Info on Time Zones:

    1. When The Windows Phone sends the info about the event to the CalDav Server, the phone tells iCloud the event is in "Eastern Standard Time". (It should be "Eastern Direct Time" bc DST.) When the CalDAV Server correctly sends this data back to the phone, the phone processes as "Eastern Standard Time" and "bumps" the event forward an hour. The phone also doesn't send all the proper TimeZone info back to the server in the ICS file, resulting in a non-editable event in the iCloud calendar. If you Switch the displayed time zone from "Eastern Standard Time" to "Eastern Time" in the iCloud Calendar app, you can edit the event. When it comes back to the phone, it will be off by 4 hours due to the processing bug (see 2)

    2. CalDAV entries that are created in iCloud come back to the device with a time zone of "US/Eastern". I am guessing there is a parsing bug in the app so that when it sees the "/", it freaks out, stops processing the TimeZone data contained in the ics file, and leaves the entry as GMT.

    A couple of ways that may fix the TimeZone issue with the calendars:
    1. Turn on TimeZone Support vial iCloud.com or the Calendar app. Make all your entries in the "Floating" time zone. This forces all calendar entries to be set with the "Real" time on the server and strips out TimeZone calculation.
    2
    There's a registry flag which supposedly "fixes" this behavior on Windows; it may work on WP8 too. The relevant key is present...
    Hive: HKEY_LOCAL_MACHINE
    Key: SYSTEM\CurrentControlSet\Control\TimeZoneInformation
    Value: RealTimeIsUniversal
    Data: 1 (DWORD)

    Reboot the phone after setting that, and if needed, fix the time (it should fix automatically if it has signal from a tower or GPS). See if that helps.
    1
    Apple iCloud works perfectly now!

    Great news! If you use Windows Phone 8.1, there is now a iCloud setting in 'email+accounts'... Easy peasy. Email, calendar and contacts work BUT still has annoying still has time issues with calendar entries!!!