Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test iCloud #567

Merged
merged 11 commits into from Feb 27, 2017
Merged

Test iCloud #567

merged 11 commits into from Feb 27, 2017

Conversation

untitaker
Copy link
Member

@untitaker untitaker commented Feb 27, 2017

Fix #149
Fix #565

@WhyNotHugo
Copy link
Member

Nice 👍🏻🎉

@untitaker untitaker merged commit 6aeeb90 into master Feb 27, 2017
@untitaker untitaker deleted the icloud branch February 27, 2017 18:52
untitaker added a commit that referenced this pull request Feb 27, 2017
@WhyNotHugo
Copy link
Member

I you can provide my with ICLOUD_USERNAME and ICLOUD_PASSWORD, I can try creating a VTODO inside a collection with my iPhone and we can see if there's any difference, if it appears to vdirsyncer, etc.

@untitaker
Copy link
Member Author

We would need to know how collections are created (i.e. intercept traffic of iPhone). I know that existing task lists can be synchronized.

@WhyNotHugo
Copy link
Member

What's the best way to do this? Set up a local server, configure maximum logging, and provide the output query?

Radicale is the easiest, right?

@untitaker
Copy link
Member Author

It's easier to use mitmproxy with the original iCloud server

@WhyNotHugo
Copy link
Member

WhyNotHugo commented Feb 28, 2017

Here's the request (that was fun and way easier than expected!):

Header:

Host:                   p34-caldav.icloud.com
X-Apple-Client-Info:    <iPhone7,2> <iPhone OS;10.2.1;14D27> <com.apple.coredav/1.0.1 (com.apple.dataaccess.dataaccessd/1.0)>
Accept:                 */*
Authorization:          X-MobileMe-AuthToken REDACTED
Content-Encoding:       gzip
Accept-Language:        en-gb
Cache-Control:          no-transform
Accept-Encoding:        gzip, deflate
X-Apple-DAV-Pushtoken:  261525c47f7996b02f4bd5582330920170c48f5b7479be2b298651aa6606fbe5
Content-Length:         550
User-Agent:             iOS/10.2.1 (14D27) dataaccessd/1.0
Connection:             keep-alive
Content-Type:           text/xml

(I didn't find how to export this from mitmproxy, so just copy-pasted it).

Body:

<?xml version="1.0" encoding="UTF-8"?>
<B:mkcalendar xmlns:B="urn:ietf:params:xml:ns:caldav">
  <A:set xmlns:A="DAV:">
    <A:prop>
      <A:displayname>Test999</A:displayname>
      <F:calendar-color xmlns:F="http://apple.com/ns/ical/">#cc73e1</F:calendar-color>
      <B:calendar-timezone>BEGIN:VCALENDAR&#13;
VERSION:2.0&#13;
CALSCALE:GREGORIAN&#13;
BEGIN:VTIMEZONE&#13;
TZID:America/Argentina/Buenos_Aires&#13;
BEGIN:DAYLIGHT&#13;
TZOFFSETFROM:-0300&#13;
DTSTART:20071230T000000&#13;
TZNAME:GMT-3&#13;
TZOFFSETTO:-0200&#13;
RDATE:20071230T000000&#13;
RDATE:20081019T000000&#13;
END:DAYLIGHT&#13;
BEGIN:STANDARD&#13;
TZOFFSETFROM:-0200&#13;
RRULE:FREQ=YEARLY;UNTIL=20090315T020000Z;BYMONTH=3;BYDAY=3SU&#13;
DTSTART:20080316T000000&#13;
TZNAME:GMT-3&#13;
TZOFFSETTO:-0300&#13;
END:STANDARD&#13;
END:VTIMEZONE&#13;
END:VCALENDAR&#13;
</B:calendar-timezone>
      <B:schedule-calendar-transp>
        <B:transparent/>
      </B:schedule-calendar-transp>
      <B:supported-calendar-component-set>
        <B:comp name="VTODO"/>
      </B:supported-calendar-component-set>
      <F:calendar-order xmlns:F="http://apple.com/ns/ical/">3</F:calendar-order>
    </A:prop>
  </A:set>
</B:mkcalendar>

supported-calendar-component-set is the important bit. As expected after the above query, the new list did not appear on the calendar app, only on the reminders app.

@untitaker
Copy link
Member Author

Continuing at #570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants