iphone google reminder problem
I am integerating iphone app with google calendar using gdata api's. Done with event add, delete, fetch, update
but the reminder is not adding in calenda开发者_运维百科r event
My code is :
NSDate *anHourFromNow = [NSDate dateWithTimeIntervalSinceNow:60*60];
GDataDateTime *startDateTime = [GDataDateTime dateTimeWithDate:[NSDate date] timeZone:[NSTimeZone systemTimeZone]];
GDataDateTime *endDateTime = [GDataDateTime dateTimeWithDate:anHourFromNow timeZone:[NSTimeZone systemTimeZone]];
GDataReminder *reminder = [GDataReminder reminder];
[reminder setMinutes:@"10"];
GDataWhen *when = [GDataWhen whenWithStartTime:startDateTime endTime:endDateTime];
[when addReminder:reminder];
[event addTime:when];
if (event)
{ // Post the event.
NSURL *altLinkURL = [[calendar alternateLink] URL];
[service fetchEntryByInsertingEntry:event forFeedURL:altLinkURL delegate:nil didFinishSelector:nil]; }
Using this code event is added in calendar but reminder is not appearing when I manually see in this event in google calendar
Reminder should have an explicit setMethod: call; discussion is here.
精彩评论