iphone - iPhone Chrome 上的 ICS 文件下载失败,错误代码为 "Unknown File Type"

标签 iphone google-chrome mobile-safari icalendar mobile-chrome

我有一个 PHP 脚本,可以为移动 Web 应用程序自动生成 ics 文件。

在我的 Win7 桌面上使用 Chrome,ics 文件下载效果很好,Outlook 也喜欢它。

在我的 iPhone 上使用 Safari,ics 文件按预期打开日历应用程序,并允许我添加到日历。

在 iPhone 上使用 Chrome 时,我收到“下载失败。Chrome 无法下载此文件。错误 102 ():未知的文件类型。”

我正在发送这些 header :

header("Content-Type: text/Calendar; charset=utf-8");
header("Content-Disposition: inline; filename={$slug}.ics");
header("HTTP/1.0 200 OK", true, 200);

我的 ics 文件输出是:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//example.com//NONSGML blah blah//EN
METHOD:PUBLISH
BEGIN:VEVENT
UID:20130412T062148-527420343@example.com
DTSTAMP:20130412T062148
DTSTART:20130524T134500Z
DTEND:20130524T153000Z
LOCATION:
SUMMARY:This is the summary
DESCRIPTION:This is the description
STATUS:CONFIRMED
TRANS:OPAQUE
END:VEVENT
END:VCALENDAR

关于 iPhone Chrome 不喜欢什么有什么想法吗?

最佳答案

这看起来像是 iOS 版 Chrome 中的一个错误。请参阅https://bugs.chromium.org/p/chromium/issues/detail?id=666211

关于iphone - iPhone Chrome 上的 ICS 文件下载失败,错误代码为 "Unknown File Type",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15972628/

相关文章:

html - 使用 CSS 向选择元素添加空间的正确方法是什么?

jquery - 动画在 iPhone 上的移动 Safari 中效果不佳

ios - 通过 Safari 打开时,Firebase 动态链接不会重定向到应用程序

iphone - 在不重启设备的情况下禁用主页按钮

ios - 如何在委托(delegate)中加载插页式广告并在另一个 View Controller 中显示?

iphone - 从 UIWebView 检测 window.open()

jQuery .slideUp() 在 Chrome 中不起作用

css - 字体自定义不在 Chrome 中渲染字体

javascript - iOS 12 浏览器 : Is there a way to make web-based QR Scanning work?

iPhone,纠察板上的对象如何检测操作表何时关闭/解除?