-
How to connect to icloud calendar?
almost 10 years ago
-
almost 10 years ago
Another approach I have implemented
Just wanted to brief my understanding on CalDAV:
CalDAV is a calendaring and scheduling client/server protocol designed to allow users to access calendar data on a server, and to schedule meetings with other users on that server or other servers (http://caldav.calconnect.org).
Implementation of CalDAV Client:
User will provide user name (Apple Id), password and URI (https://p25-caldav.icloud.com/).
To connect to icloud Calendar we will create a "PROFIND" request using provided credentials from point 1 and with some CalDAV standard based request xml (https://github.com/muhlba91/icloud/blob/master/PHP/icloud.php).
The first request will return a token(user id). This user id will be the key to communicate with iCloud Calendar. We can store this key on our server for further operations.
Using returned token/user - id we can make request to iCloud Calendar, the URI will be look like this (https://p25-caldav.icloud.com/
/calendars/ ).Once we are able to connect to iCloud Calendar by following steps 1 to 4 mentioned above., then we can do the following actions (http://sabre.io/dav/building-a-caldav-client/) :
a) Retrieve calendar information. b) Download objects. c) Find out if anything has changed. d) Update a calendar object. e) Create a calendar object. f) Deleting a calendar object.
This is the basic idea to integrate iCloud Calendar using CalDAV Client. We also need to take care of all the errors and status returned by the server (401,404,403,409,500 .. etc.). And other cases like if user changed his credentials.
If anyone wants to c# code for this please query to our site.
Happy Coding :)
-
1 Comment(s)