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

Conversation

Projects
None yet
2 participants
@untitaker
Member

untitaker commented Feb 27, 2017

Fix #149
Fix #565

Test iCloud
Fix #149

untitaker added some commits Feb 27, 2017

@untitaker untitaker force-pushed the icloud branch from ff1c7cd to 66bd90f Feb 27, 2017

untitaker added some commits Feb 27, 2017

@WhyNotHugo

This comment has been minimized.

Member

WhyNotHugo commented Feb 27, 2017

Nice 👍🏻🎉

@WhyNotHugo

This comment has been minimized.

Member

WhyNotHugo commented on tests/storage/dav/test_caldav.py in ba698b0 Feb 27, 2017

Are you sure? By default, my iPhone syncs reminders (VTODOS) to iCloud.

This comment has been minimized.

Member

untitaker replied Feb 27, 2017

iCloud calendars created with vdirsyncer don't allow uploading of VTODOs. I don't know how to fix this, but I don't really care.

@untitaker untitaker merged commit 6aeeb90 into master Feb 27, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@untitaker untitaker deleted the icloud branch Feb 27, 2017

@untitaker untitaker removed the in progress label Feb 27, 2017

untitaker added a commit that referenced this pull request Feb 27, 2017

@WhyNotHugo

This comment has been minimized.

Member

WhyNotHugo commented Feb 28, 2017

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

This comment has been minimized.

Member

untitaker commented Feb 28, 2017

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

This comment has been minimized.

Member

WhyNotHugo commented Feb 28, 2017

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

This comment has been minimized.

Member

untitaker commented Feb 28, 2017

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

@WhyNotHugo

This comment has been minimized.

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

This comment has been minimized.

Member

untitaker commented Feb 28, 2017

Continuing at #570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment