通过Xcode将Google日历导入iCal?

时间:2013-01-18 04:32:48

标签: iphone ios objective-c xcode icalendar

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

1 个答案:

答案 0 :(得分:1)

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

试试吧。

Google日历有一个公共API here

如果您熟悉JSON(或搜索stackoverflow),您将看到如何向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];
}

它将逐个导入所有Google日历。

祝你好运!

相关问题