-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Push sync for calendars, tasks, and contacts (CalDAV and CardDAV) #22379
Comments
Not sure about what Apple's push for *DAV refers to but the only close thing to work with that we've got is this 3-year old first version of an IETF draft : https://tools.ietf.org/html/draft-gajda-dav-push-00. Maybe it refers to this Apple's CalendarServer extension for Discovery of CalDAV Push-Notification Settings, but since Apple abandoned CalendarServer, not sure this is a safe bet. Asking Fastmail for their technical details would indeed be a first step, but I'm thinking since they are working on JMAP Calendars, not sure they did go this way. Anyway, I've not heard of any other clients supporting this, so it would be quite useless for non-Apple users for a while. |
I don't like pull sync as it is now neither. |
In theory, that could be done over OpenPush (see https://gitlab.com/bitfireAT/davx5-ose/-/wikis/Roadmap#other-ideas). But then
So I'd not expect this for the near future... |
@nextcloud/server-triage is this feasible? |
The development of OpenPush seems to have stalled, and none of the other things mentioned did change, including no client changes. Note that there's now a JMAP app for Nextcloud https://github.com/audriga/nextcloud-jmap. |
I don't think Fastmail is using JMAP Calendars to send notifications to iOS because the Apple integration uses CalDAV and I doubt Fastmail's CalDAV server speaks JMAP with Apple servers. I'm going to reach out to Fastmail to learn more about how they are actually doing it. Will report back when I know more about it, in case this information is still of interest to you. |
@jvican Thanks for thinking of that. Sorry I neglected to reply here, but I worked through Fastmail support to reach a dev. Here's what they shared.
There are still (unsupported) ways to get the necessary push notification certificates from Apple. For example: @tcitworld Is it possible to reopen this issue and explore some of the above? I think there are no other viable paths forward for push notification for Apple platforms otherwise? |
That's a great piece of information ! We shouldn't need mangling with Apple's certificate, and possibly could just reuse the push proxy used by the Nextcloud notification app (which, if we use it, will need adjustments to send custom payloads nextcloud/notifications#1055, otherwise put this directly in The form of the registration is flexible enough to have transports of other types, for instance DAVdroid could support Even better, we could do WebPush in the browser to tell the calendar to refresh itself (instead of nextcloud/calendar#31). <push-transports xmlns='http://calendarserver.org/ns/'>
<transport type='APSD'>
<subscription-url>
<href xmlns='DAV:'>https://server.example.com:8443/apns</href>
</subscription-url>
<apsbundleid>com.apple.calendar.XServer.934668ca-125e-4246-afee-8cf2df37aab8</apsbundleid>
<env>PRODUCTION</env>
<refresh-interval>172800</refresh-interval>
</transport>
</push-transports> There's more investigation needed, and the lack of documentation will be a pain in the ass, but this is exciting. |
@tcitworld We're very interested in getting push (over both Google and open protocols) to CalDAV/CardDAV/DAVx5. I will have a a look at this. |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
This comment has been minimized.
This comment has been minimized.
WebPush and UnifiedPush are (practically) API compatible, so supporting WebPush (using one of the many existing libraries) for browsers means automatically supporting UnifiedPush for Android clients on the server-side |
@tcitworld I was excited to see this get tagged as a feature to develop about a year ago. Is this still in something we can expect? Or better to look elsewhere for CalDAV (and CardDAV) push? Thanks. |
Well, a long as someone's not paying Nextcloud GmbH for development, this depends on volunteer work (possibly mine). So it could come anytime between soon or never. There's still interest for this from a user and developer point of vue anyway.
I don't know of any other FLOSS project working on this, but feel free to check. Fastmail could well also be the only service in the world doing push over CalDAV, as the rest of the ecosystem may have moved to private APIs and/or JMAP. Maybe some of the people at CalConnect know. |
Just an orphaned former Mac OS Server user without the skills or resources to engage in this work hoping to find a way to continue to self-host calendar data (with push notifications to my iOS devices) and hoping that connecting someone here on the NextCloud CalDAV side with someone familiar with Apple Push Notifications side might see some magic happen. freswa/dovecot-xaps-daemon#20 (comment) Thanks. |
We planning to start working on this pretty soon! For this we've teamed up with @verdigado who are interested in bringing this to life on the Nextcloud side, and we will implement it in DAVx5 for Android. We've also had a basic talk about this with @ChristophWurst and @st3iny at Nextcloud conf'22 and it seems that there is general interest in extending Nextclouds PUSH capabilities :) |
Great to hear @devvv4ever. A clarifying question from your message in November: Is the focus of the near-term work just Android (DAVx5)? Thanks. |
The current project plan is:
Working on the standard will probably start in March (this is the hardest of all these parts since it has to be developed very well and many parties are involved) |
Thanks. So iOS/iPadOS and macOS are not in the first phase of this plan? |
Thats something we can't directly influence. We'll try however to activate connections to the Apple people (via CalConnect) to get them in on this during creating/forming the standard (which is the requirement for all other steps). They need to implement the standard on their iClouds CalDAV/CardDAV connectors so that this can be of use then. If that happens you should also be able to receive instant push notifications on Android via DAVx5 when a collection on the server (for example a calendar on the icloud server) has changed. |
I see. So the approach described above for Apple devices won't be pursued or that's part of this approach? #22379 (comment) Would Z-Push be the best path forward for push on Apple devices then? |
What about combining the approach for push notifications originally taken in Apple's original open source CalDAV server (http://www.calendarserver.org/) and with the approach taken to patch the dovecot code to use Apple's new HTTP/2 push notification API (https://github.com/freswa/dovecot-xaps-daemon)? Automatic APNS certificate generation and renewal (that used to be taken care of by macOS Server) is included in the second project (which will give you native push notifications with iOS's calendar app (and the macOS one). If it can be done for dovecot, why not nextcloud's CalDAV implementation? |
There's been some discussion on creating an extension to caldav for push mechanisms on a separate issue tracker. This separate discussion originally started out between myself (vdirsyncer maintainer) and some of the DAVx5 devs, since we both want push updates on the client side (although on different platforms). IMHO, it seems that using caldav-pubsubdiscovery.txt as a base with Web Push is the best fit. Replacing APN-specific properties with WebPush-specific ones should suffice for this use case, while using APN (apple's notification protocol) as a non-normative/de-facto variation will result in things working properly on Apple's ecosystem. If someone is willing to work on a server-side of this, I'm pretty confident that I can address a client side implementation (e.g.: for vdirsyncer) in the coming months. |
I have started to look at details of the implementation in Nextcloud. Implementation details are:
On collection changes, we add a new listener for already existing events that lists registered providers for the user and sends notifications to the subscription URLs. Other than that, we also need to explore how handle expired subscriptions (make sure every provider have a receipts concept and return appropriate error messages if subscription is expired). ¹ Obviously, you'll still need API keys (and eventually payment) for those. |
There is already work on the webpush part: nextcloud/notifications#1225 cc @karmanyaahm @Zocker1999NET |
Is your feature request related to a problem? Please describe.
Nextcloud is clearly maturing fast. Thanks to everyone for the hard work. To bring it to parity with other first class cloud services, it would be awesome if Nextcloud could provide push notifications for CalDAV and CardDAV. Changes to calendars and tasks would benefit from faster propagation without needing to resort to rapid fetch intervals, which are resource intensive. It's frustrating when changes across devices are not in sync and create version control issues when editing on multiple devices.
It appears to be possible to enable push for CalDAV and CardDAV on Apple iOS, iPadOS, and macOS devices. Not sure about other devices.
Describe the solution you'd like
Implement something like this from FastMail. Unclear what the technical backend is. Perhaps they would be willing to share. For iOS, iPadOS, and macOS, it appears this involved collaboration with Apple, although not sure.
https://fastmail.blog/2016/10/10/push-sync-for-contacts-calendars-now-available-on-ios/
Describe alternatives you've considered
Faster fetch intervals are imperfect, drain resources (especially for battery powered devices. Z-push is an option but clunky and also resource intensive. It is inefficient, since it just converts CalDAV and CardDAV to Microsoft ActiveSync. This also creates reliance on a new protocol.
Thanks again, and completely understand that this is "nice to have" not "need to have." But, given how Nextcloud is maturing, it would be awesome to bring it to parity with cloud services others offer.
The text was updated successfully, but these errors were encountered: