【问题标题】:Importing Google Calendar into iCal through Xcode? [closed]通过 Xcode 将 Google 日历导入 iCal? [关闭]
【发布时间】:2013-01-01 18:44:07
【问题描述】:

我是应用程序开发的新手,我想知道,有没有办法导入 Google 日历,然后将所有事件导入 iCal,或者只导入整个日历?甚至可能吗?另外,如果可以的话,我该怎么做?

【问题讨论】:

  • 这和 Xcode 有什么关系? iCal 支持同步到 Google 日历。
  • 如果您查看我的问题,我会问如何将 Google 日历导入 iCal,而不是相反...另外,我正在制作一个应用程序,这就是为什么它与Xcode。这是一个反问。
  • @EliteGamer 你的后一点是错误的。这个问题是关于用objective-c语言编写的应用程序,而不是该语言的专有IDE。如果 Xcode 本身拒绝运行你的小日历应用程序,那么它是有道理的。
  • 加入 iCal?你是说 iOS 的日历应用吗?
  • 是的,这就是我的意思...苹果 iOS 设备的日历

标签: iphone ios objective-c xcode icalendar


【解决方案1】:

http://code.google.com/p/iphone-gcal/wiki/GettingStarted

试试看。

Google 日历有一个可用的公共 API here。

如果您熟悉 JSON(或通过 stackoverflow 进行搜索),您将了解如何在 Google 日历中发送事件或从 Google 日历发送事件。

您可以通过这些代码行导入整个日历。只需尝试一次:-

EKEventStore *eventStore = [[EKEventStore alloc] init];
//EKEvent *events = [EKEvent eventWithEventStore:eventStore];
NSArray *caleandarsArray = [[NSArray alloc] init];
caleandarsArray = [eventStore calendars];

for (EKCalendar *iCalendars in caleandarsArray)
{
    NSLog(@"Calendar Title : %@", iCalendars.title);
    [self.calendars addObject:iCalendars.title];
}

它会一一导入所有谷歌日历。

祝你好运!

【讨论】:

  • 不导入单个事件,有没有办法导入整个日历?
  • 不会造成延迟吗?
  • 你在说什么延迟?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-07-05
  • 2012-03-13
  • 1970-01-01
  • 1970-01-01
  • 2017-12-19
  • 2013-12-09
相关资源
最近更新 更多