将 .ics 导入 iOS 应用程序

发布于 2025-01-01 23:26:34 字数 243 浏览 1 评论 0原文

我正在制作一个从 SIS(学生信息服务)(称为 PowerSchool)导入成绩的应用程序。起初我认为我需要解析 HTML 标签来获取信息并组织它。我什至找到了已经成功完成此操作的人,但我需要大约 5 分钟才能刷新,破坏了应用程序的便利性。最近,我发现该网站允许您将所有发布的作业导出为 .ics 格式,并在 iCal 和其他日历程序中查看它们。我相信利用 .ics URL 将是将它们导入我的应用程序的最简单、最快的方法,但我不知道如何去做。有人可以指出我正确的方向吗?

I am making an app that imports grades from a SIS (Student Information Service) known as PowerSchool. At first I thought that I would need to parse the HTML tags to get the information and organize it. I even found someone who had already successfully done so but I takes about 5 minutes to refresh, ruining the convenience of the app. Recently, I discovered that the site allows you to export all of the posted assignments into an .ics format and view them in iCal and other calendar programs. I believe that utilizing the .ics URLs would be the easiest and fastest way to import them into my app, but I don't know how to go about doing this. Could someone please point me in the right direction?

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

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

发布评论

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

评论(2

错々过的事 2025-01-08 23:26:34

另外,使用 >= ios 4.2,您甚至不需要为日历指定 UTI,您可以像这样简单地调用菜单。

[documentController presentOpenInMenuFromRect:CGRectZero inView:[self view] animated: NO];

Also with >= ios 4.2 you don't even need to specify UTI for calendar you can simple call the menu like this.

[documentController presentOpenInMenuFromRect:CGRectZero inView:[self view] animated: NO];
凉栀 2025-01-08 23:26:34

我可能是错的,但您可以捕获点击,

if (navigationType==UIWebViewNavigationTypeLinkClicked)
{
    //check if the link is .ics     
    if ([[[[[request URL] absoluteString] pathExtension] lowercaseString] isEqualToString:@"ics"])
    {

        // here you call a delegated method to UIDocumentInteractionController 
    }
} 

您应该阅读 UIDocumentInteractionController 也是如此。该文档是 .pdf,但您也可以指定日历的 UTI。

I could be wrong but you can capture the click with

if (navigationType==UIWebViewNavigationTypeLinkClicked)
{
    //check if the link is .ics     
    if ([[[[[request URL] absoluteString] pathExtension] lowercaseString] isEqualToString:@"ics"])
    {

        // here you call a delegated method to UIDocumentInteractionController 
    }
} 

You should read up on UIDocumentInteractionController as well. The document is .pdf but you can also specify the UTI for calendar.

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