ios - iPhone 事件工具包 : programmatically SUBSCRIBE to a new calendar

标签 ios eventkit ekeventkit

我被引导到this answer这告诉我们如何创建离线日历(我认为)但是我如何订阅服务器上的 URL 以 ics 格式吐出日历?这可能吗?

最佳答案

为什么不使用这个:How to programmatically add calendar subscriptions on iOS?

总结接受的答案:

NSString *url = @"http://server/filename.ics";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];

编辑:在我自己的应用程序中使用它并验证它有效...

Edit by MitchR: For those generating their own ics feeds on the server, the url must end in .ics to receive the subscription prompt. The MIME type of the response must also be text/calendar. My server is a .NET/MVC server so I added a custom route so I could have the .ics on the end of the controller action.

关于ios - iPhone 事件工具包 : programmatically SUBSCRIBE to a new calendar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10810095/

相关文章:

iphone - 将参与者添加到 iOS 中的事件

ios - 如何在 Swift 中正确重构对象初始化的第一阶段?

ios - 从 MKMapView 生成缩略图

iphone - EKEventStore,我需要单独使用 iOS 6 的 EventKit.Framework 吗?

c# - Monotouch EKEvent 注释未保存

swift - 收到 "unexpectedly found nil while unwrapping an Optional value"错误

ios - EKEventStore eventWithIdentifier 导致 EKCADErrorDomain 错误 1010

ios - Firebase:我应该如何构建我的数据库?喜欢 Offerup 和 Letgo

ios - HUD 加载程序在 UITableViewController 中无法正确显示

objective-c - EKEventEditViewController 添加和取消按钮没有响应