-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Adding iCloud Support (WIP) #60
Conversation
This is some good work! I'm looking forward to seeing the increased compatibility. I'm not sure if it is specific to syncing with Google Calendar or not, but OAuth2 syncing fails with the new changes. I receive the following error: https://gist.github.com/watersalesman/bb6bb6e3557977407904c9937ad172aa This happens with normal syncing, as well as any of the --init types. |
@watersalesman Thanks for testing. Looks like I need to revive my google account and test this with iCloud side by side. Interesting, that I read apple, calendar server, mobileme etc in your error trace. This is not coming from |
@xkpd3 Nope, this account is in no way shape or form connected to any Apple products/accounts. A quick search shows other people getting things such as mobileme within their responses from Google Calendar, so it's likely from there. |
Thanks so much for working on this. I know this is a non-trivial task and requires quite some patience and debugging skills, so your work is much appreciated! Some remarks:
|
@lfos: I agree with all points. I didn't start with the idea of implementing iCloud support. I started with the intention to make it work somehow for me. Then it turned out to be a more complicated task. That aside, I can spend some more time on this and fix things up and create proper commits to allow a productive collaboration (and allow you to merge parts of it). WebDav / CalDav are new protocols for me (from a developer perspective), so there is a good cance that iCloud can do more and I did just not find the solution (yet). CalDav is based on WebDav and my conclusion was, that PROPFIND should work everywhere. But I see your point and maybe we should be open to allow multiple calls. This would be required for multiple calendar support anyway.
|
You are totally right about |
I can see a weird sync bahavior right now. Download works fine. When a local event gets added it gets synced. The next sync will remove a lot of local entries even they have not been removed remotely. I assume that the syncdb expand must be done in multiple places. I tried to move it to the On the positive side, I have successfully synced a few events to iCloud - so the UID issue might not exist - or was caused by something else. |
When querying the server for VTODO and VEVENT, iCloud returns the base URL in the list of URLs well. This leads to an error as no iCal information is provided. This base URL can safely be skipped. Signed-off-by: Stefan Hagen <github@textmail.me>
If the server returns multiple events within an ical file, multiple objhashes have to be saved. Because the URL is the key field, multiple database entries are not an option. With this commit, a semicolon separated list of hashes is created in the database. When syncing, the list is temporarily expanded in order to find out what needs to be synced. The change is backwards compatible. Signed-off-by: Stefan Hagen <github@textmail.me>
In order to support iCloud, we need two queries - one for EVENTs and one for TODOs. iCloud does not allow to query without a event or todo filter. These filters can not be combined with a logical OR. One solution would be to use webdavs `PROPFIND` method. In order to minimize the risk of breaking existing functionality, it's better to stick with the webcals `REPORT` method and duplicate the query. Signed-off-by: Stefan Hagen <github@textmail.me>
Well, currently, the internal data structure used to represent the synchronization database is a dictionary which maps each URL to an ETag and to a calcurse object hash. To implement the "multiple events per URL" feature properly, I guess we should change this to be a dictionary of 2-tuples, where the first entry in the tuple is the ETag and the second entry is a list of calcurse object hashes. Then, the expansion of lists needs only be done when reading (writing) the synchronization database from (to) the disk. And, of course, one must check all uses of the |
Regarding the two |
iCloud requries DTEND to be present when adding an all day event. This commits duplicates the DTSTART as DTEND if no DTEND is specified. Signed-off-by: Stefan Hagen <github@textmail.me>
Reg. your first comment: Reg. your second comment: |
Depends on what you mean by "allow to acces data by hash as well as by href". Of course, the data structure allows accesses in both directions because it contains all information from the synchronization database. Lookups by |
So, is it safe to test this? |
I don't think so. This is pretty incomplete and, as Stefan mentioned, currently broken... |
Oh, sad it's broken. The incompleteness wouldn't matter, because this seems to fix some bug with Google Calendar and that is what I actually need. |
@dasJ: I'm a bit short with free time right now. I'll continue on the weekends when possible. The next step is a bigger one, because it involves a database structure change. Which google calendar bug are you referring to? Maybe we can fix this earlier. Please open a separate issue for it. |
@xkpd3 Thank you for your work! There is already #20 which seems to be my problem |
Maybe we can do smaller steps. The directory href patch can be included as-is, I guess. I renamed issue #20 -- we should fix that next in a separate PR. |
I added some ideas and open problems to #20 -- it would be great to have more people join that discussion! |
What's the status of this PR? Do you plan on continuing your work on this? |
I'm planning to continue, I just have trouble finding the time for it. |
Any progress? Would you like somebody else to pick this up? |
If anybody wants to pick this up - please do so. I can only reproduce the issues with my real calendar. And I lost many entries because of it. I was not able to reproduce the issue in my test calendar. This multi-event-entries never showed up. |
The problem is that I cannot reproduce the behavior at all... Maybe somebody else can help isolate the issue? |
Is this stalled because the developer is unable to reproduce? Please let me know if this is the case and I can test on my 100% consistently-failing setup. |
It is stalled because the original PR submitter stopped working on it. Missing pieces are described in the comments above. Feel free to pick it up. |
Note that vdirsyncer supports icloud remotes (see #188) |
Closing due to inactivity. I would be really happy if somebody with iCloud access picks this up and completes the work though! |
This is my first attempt to make
calcurse-webdav
play with the Apple iCloud calendar. It's supposed to solve issue #30....but not yet. The download works, sync works, upload does not yet work.
I'll post this pull request already. It would be interesting to know if the download still works with other caldav servers. Does it break google?
Issues: