5,596,235 Members 35,349 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
compu829
Old
(Last edited by compu829; 15th October 2013 at 07:22 PM.) Reason: More infos!!!
#1  
Senior Member - OP
Thanks Meter 195
Posts: 229
Join Date: Nov 2006
Thumbs up [TUTORIAL] Add native iCloud (IMAP, CardDAV, CalDav) support to WP8 GDR2 Devices!!

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.
The Following 4 Users Say Thank You to compu829 For This Useful Post: [ Click to Expand ]
 
TheInterframe
Old
#2  
TheInterframe's Avatar
Junior Member
Thanks Meter 4
Posts: 21
Join Date: Mar 2013
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
Old
#3  
Recognized Developer
Thanks Meter 2471
Posts: 5,291
Join Date: Jan 2011
Location: 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.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
 
compu829
Old
#4  
Senior Member - OP
Thanks Meter 195
Posts: 229
Join Date: Nov 2006
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
Old
#5  
Recognized Developer
Thanks Meter 2471
Posts: 5,291
Join Date: Jan 2011
Location: 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\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.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
The Following 2 Users Say Thank You to GoodDayToDie For This Useful Post: [ Click to Expand ]
 
compu829
Old
(Last edited by compu829; 15th October 2013 at 07:24 PM.)
#6  
Senior Member - OP
Thanks Meter 195
Posts: 229
Join Date: Nov 2006
Quote:
Originally Posted by GoodDayToDie View Post
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.
 
Alexander Man
Old
(Last edited by Alexander Man; 15th April 2014 at 06:07 AM.)
#7  
Junior Member
Thanks Meter 2
Posts: 14
Join Date: 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!!!
The Following User Says Thank You to Alexander Man For This Useful Post: [ Click to Expand ]
 
compu829
Old
#8  
Senior Member - OP
Thanks Meter 195
Posts: 229
Join Date: Nov 2006
It was the first thing I set up
 
GoodDayToDie
Old
#9  
Recognized Developer
Thanks Meter 2471
Posts: 5,291
Join Date: Jan 2011
Location: 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).
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.

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

Advanced Search
Display Modes


XDA PORTAL POSTS

Force Translucent Status Bar in KitKat ROMs with Xposed

It’s been a while since Android 4.4KitKat wasreleased, and we’re slowly … more

Fix the Ambient Light Issues on Your Google Nexus 5 using Xposed

The Google Nexus 5 is a great and rather popular device. This LG-produced … more

Google Glass XE16 Update Factory Image and Rooted Bootloader Now Available

You may recall that early yesterday, we talked about the XE16 … more