How to push events to IPhone calendar

蓝咒 提交于 2019-12-03 14:00:36

This is a nice introduction: Building a CalDAV client. It also describes how the calendar discovery process works (how you find the calendar homeset URL).

Many CalDAV servers do not support OAuth, you'll usually have to ask the user for login/password.

There doesn't seem to be a .NET library for CalDAV. You can find a list of implementations over here: http://caldav.calconnect.org/implementations/librariestools.html.

Summary: Probably not as easy as what you did with Google, but not super hard either. And once you have it, you can connect to many different servers, given that CalDAV is a standard ... (including Google, you can connect to that with CalDAV as well).

Update after the EDIT of the question:

The 401 is a generic HTTP response. It means that you need to provide credentials to continue with the request. A client would usually prompt the user for login/password and then re-run the request. Basic authentication is well described in the Wikipedia article on Basic auth.

Another mistake is to use p42-caldav.icloud.com as the entry point URL. Use caldav.icloud.com as you don't know which partition the user is on. You need to use the discovery process as described in Building a CalDAV client to find the actual URL the users calendar is hosted on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!