0
Google 캘린더의 정보를 가져 와서 만든 응용 프로그램으로 가져 오기 위해 특별히 Google 데이터의 API를 살펴 봤습니다. 지금은 데이터이므로 아래 예제에서는 tableview를 사용합니다). 필자는 함수/메소드에 대한 직접적인 참조를 찾지 못했고 매우 어렵게 만들었습니다. 누군가 나를 인도 할 수 있을까요? 내가하고 싶은 일은 달력에서 모든 이벤트를 가져 오는 것입니다. 편집 할 필요가 없습니다. 나는 올바른 방향으로 내려갈 지 확신 할 수 없다.iOS에서 Google 캘린더 이벤트를 가져 오는 방법
-(void)fetchEntries{
calendarService = [[GDataServiceGoogleCalendar alloc] init];
NSString *username = @"Gmail Username";
[calendarService setUserCredentialsWithUsername:username password:@"password"];
NSURL *feedURL = [GDataServiceGoogleCalendar calendarFeedURLForUsername:username];
GDataServiceTicket *ticket;
ticket = [calendarService fetchFeedWithURL:feedURL delegate:self didFinishSelector:@selector(ticket:finishedWithFeed:error:)];
//ticket = [calendarService fetchFeedWithURL:feedURL delegate:self didFinishSelector:@selector(calendarEventsTicket:finishedWithEntries:error:)];
}
- (void)ticket:(GDataServiceTicket *)ticket
finishedWithFeed:(GDataFeedCalendar *)feed
error:(NSError *)error {
if (error == nil) {
NSArray *entries = [feed entries];
if ([entries count] > 0) {
GDataEntryCalendar *firstCalendar = [entries objectAtIndex:0];
GDataTextConstruct *titleTextConstruct = [firstCalendar title];
NSString *title = [titleTextConstruct stringValue];
NSString *description = [firstCalendar description];
NSLog(@"first calendar's title: %@ and description: %@", title, description);
GDataLink *link = [firstCalendar alternateLink];
[self beginFetchingFiveEventsFromCalendar:firstCalendar];
if (link != nil) {
// [service fetchFeedWithURL:[link URL] delegate:self didFinishSelector:@selector(eventsTicket:finishedWithFeed:error:)];
NSLog(@"\n\nAlternate link: %@", link);
}
} else {
NSLog(@"the user has no calendars");
}
} else {
NSLog(@"fetch error: %@", error);
}
}