我被引导到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/