如何在自定义应用程序中检索 iPhone 上的所有同步日历?

发布于 2024-12-28 05:04:51 字数 167 浏览 1 评论 0原文

我想向用户展示他们在 iPhone 或 iPad 中同步和使用的日历。我花了更多时间来搜索我的问题的结果。但是,我无法为我的问题找到正确的解决方案。您能告诉我从 iPhone 应用程序检索同步的日历吗?这意味着如果用户同步了 Google 日历,我的应用程序应该显示其 iPhone 设备中的日历列表。提前致谢。请帮我。

I want to show the user what are the calendars they synced and using in their iPhone or iPad. I spent more time to searched result for my question. But, i can't get the correct solution for my question. Can you please tell me to retrieve the synced calendars from iPhone app? That means if the user synced Google calendar my app should show the list of the calendar in their iPhone device. Thanks in advance. Please help me.

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

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

发布评论

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

评论(1

贪了杯 2025-01-04 05:04:51

感谢大家。我已经找到了我的问题的解决方案。我使用 EKCalendar 从 EKEventStore 检索所有日历。这是我的代码,

 NSArray *caleandarsArray = [[NSArray alloc] init];
    caleandarsArray = [[eventStore calendars] retain]; 
   // NSLog(@"Calendars from Array : %@", caleandarsArray);

     for (EKCalendar *CalendarEK in caleandarsArray) 
     {
         NSLog(@"Calendar Title : %@", CalendarEK.title);
     }

这对我来说工作得很好。它显示 iOS 设备上的所有日历。谢谢。

Thanks to all. I have found the solution for my question. I used EKCalendar to retrieve all the calendars from EKEventStore. Here is my code,

 NSArray *caleandarsArray = [[NSArray alloc] init];
    caleandarsArray = [[eventStore calendars] retain]; 
   // NSLog(@"Calendars from Array : %@", caleandarsArray);

     for (EKCalendar *CalendarEK in caleandarsArray) 
     {
         NSLog(@"Calendar Title : %@", CalendarEK.title);
     }

This is working fine for me. It is showing all the calendars from iOS device. Thanks.

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