Official TWRP Recovery Lands on Micromax Canvas Magnus

With the recent release of Android One, Micromax and MediaTek released fully buildable … more

Update Overload: SuperSU Heavily Updated

There are apps and apps out there. Very few can reach the level of popularity required to stay at … more

Lollipop Leak Available for the Sprint Galaxy S5

Since the Android 5.0Lollipop’s official release not too long ago, we’ve seen … more

CPU Spy Gets an Android Lollipop Makeover

At some point in the distant past, you probably heard of CPU Spy for Android by XDARetired … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP compu829

10th October 2013, 07:08 PM   |  #1  
OP Senior Member
Thanks Meter: 249
 
296 posts
Join Date:Joined: Nov 2006
More
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/b...ListHelperImpl

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 by compu829; 15th October 2013 at 08:22 PM. Reason: More infos!!!
The Following 5 Users Say Thank You to compu829 For This Useful Post: [ View ]
10th October 2013, 11:18 PM   |  #2  
TheInterframe's Avatar
Junior Member
Thanks Meter: 4
 
28 posts
Join Date:Joined: Mar 2013
More
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
11th October 2013, 04:32 AM   |  #3  
Recognized Developer
Flag Seattle
Thanks Meter: 2,771
 
5,823 posts
Join Date:Joined: Jan 2011
More
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.
11th October 2013, 05:49 AM   |  #4  
OP Senior Member
Thanks Meter: 249
 
296 posts
Join Date:Joined: Nov 2006
More
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.
12th October 2013, 08:59 PM   |  #5  
Recognized Developer
Flag Seattle
Thanks Meter: 2,771
 
5,823 posts
Join Date:Joined: Jan 2011
More
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\TimeZoneInformati on
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.
The Following 2 Users Say Thank You to GoodDayToDie For This Useful Post: [ View ]
14th October 2013, 05:23 AM   |  #6  
OP Senior Member
Thanks Meter: 249
 
296 posts
Join Date:Joined: Nov 2006
More
Quote:
Originally Posted by GoodDayToDie

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\TimeZoneInformati on
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 by compu829; 15th October 2013 at 08:24 PM.
15th April 2014, 01:36 AM   |  #7  
Junior Member
Thanks Meter: 2
 
14 posts
Join Date:Joined: Feb 2010
Smile 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 by Alexander Man; 15th April 2014 at 07:07 AM.
The Following User Says Thank You to Alexander Man For This Useful Post: [ View ]
16th April 2014, 05:47 PM   |  #8  
OP Senior Member
Thanks Meter: 249
 
296 posts
Join Date:Joined: Nov 2006
More
It was the first thing I set up
17th April 2014, 05:15 AM   |  #9  
Recognized Developer
Flag Seattle
Thanks Meter: 2,771
 
5,823 posts
Join Date:Joined: Jan 2011
More
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).

Post Reply Subscribe to Thread

Tags
caldav, carddav, icloud, sync
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes