如何创建“添加到日历” iPhone 网页上的链接

发布于 2024-08-11 17:32:25 字数 219 浏览 2 评论 0原文

许多日历程序(Outlook、iCal)都支持 vCal,用于下载事件信息并将其添加到日历中。其他人可以使用 vCalendar 微格式来提取数据。然而,iPhone 似乎不支持这两种方法。

是否有任何等效功能可以让我在页面上列出事件信息,并让网站访问者只需单击一下即可将事件添加到她的日历中?由于 Mobile Safari 可以非常轻松地从网页中提取电子邮件和电话号码,因此没有类似的事件功能似乎很奇怪。

Many calendaring programs (Outlook, iCal) support vCal for downloading event information and adding it to your calendar. Others can use the vCalendar microformat to extract data. Neither of these, however, seems to be supported on the iPhone.

Is there any functional equivalent that will allow me to list event information on a page and have a website visitor add the event to her calendar with a single click? Since Mobile Safari makes it super-easy to extract emails and phone numbers from web pages, it seems odd that there's no similar functionality for events.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

任性一次 2024-08-18 17:32:25

从 iOS 5 开始,如果您创建指向 .ics 文件的 http 链接,Mobile Safari 将在日历中打开它。

As of iOS 5, if you create a http link to an .ics file, Mobile Safari will offer to open it up in Calendar.

未蓝澄海的烟 2024-08-18 17:32:25

更新:
请注意,这是一个非常古老的答案。从iOS 5开始,您可以使用EKEventStore 来访问日历活动,Mobile Safari 将在日历中打开 .ics 文件。


原始答案
这是不可能的,遗憾的是 iPhone 上没有日历 API。您可以构建一个注册 ical URL 方案的应用程序,但您仍然无法将日历条目保存到日历后端,因为没有 API(例如 AddressBook)。

Update:
Note that this is a very old answer. Since iOS 5 you can use EKEventStore to access calendar events and Mobile Safari will open .ics files in Calendar.


Original Answer
It's not possible, there is no API for the calendar on the iPhone, sadly. You can build an app that registers for the ical URL scheme, but you still won't be able to save the calendar entries to the calendar backend since there is no API (like e.g. for the AddressBook).

短叹 2024-08-18 17:32:25

一种解决方案可能是(从 iPhone OS 3.0 开始):

  • 建立日历服务器(webdav 或 caldav 协议)、创建帐户、事件...
  • 将您的 iPhone 日历订阅到其中一个帐户(例如,设置 -> 邮件、通讯录、日历) -> 添加帐户...-> 其他,添加 CalDAV 帐户 ->
  • 您的基于 Web 的应用程序将日历条目发布到适当的日历服务器帐户中

或者使用 Google 日历从您的网站发布条目,这可以轻松完成使用 CalDAV 同步到 iPhone 日历。

另一个有用的链接: http://blog.fosketts .net/2009/06/17/subscribe-internet-calendars-iphone-30/

One resolution could be (from iPhone OS 3.0):

  • estabilish a calendar server (webdav or caldav protocol), create accounts, events...
  • subscribe your iPhone Calendar to one of the accounts (eg. Settings->Mail, Contacts, Calendars->Add Account…->Other, Add CalDAV Account -> server, account details)
  • your web based app posts calendar entries into the adequate calendar server account

Alternatively use Google Calendar to post entries from your website, which can be easily synched to iPhone Calendar using CalDAV.

Another usefull link: http://blog.fosketts.net/2009/06/17/subscribe-internet-calendars-iphone-30/

七色彩虹 2024-08-18 17:32:25

在 iPhone 上,虽然没有对 vCal 的内置支持,但您可以使用其他替代方案,例如创建日历链接,用户可以单击该链接将事件直接添加到其日历中。

Cal.et 这样的工具可以为各种日历服务(包括 Apple 和 Google 等)生成这些链接。

如果您需要一种简单的方法在您的网站上集成日历功能,那么这是一种实用的方法。该工具简化了这些链接的创建,如果您定期管理日历事件,这会特别有用。

On the iPhone, while there isn't built-in support for vCal, you can use an alternative like creating a calendar link that users can click to add events directly to their calendars.

A tool like Cal.et can generate these links for various calendar services, including Apple and Google and others.

It’s a practical approach if you need a straightforward method to integrate calendar functionality on your website. This tool simplifies creating these links, which can be particularly helpful if you manage calendar events regularly.

森林散布 2024-08-18 17:32:25

您可以创建自己的 ics 文件并将其托管在公共网址上或使用免费/付费服务,例如 https://calex.link 或其他。

You can create your own ics file and host it on a public url or use free/paid services such https://calex.link or others.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文