カスタム iOS アプリでデバイスの Google カレンダー イベントを取得するアプリを開発しています。編集を作成および編集する方法に関するイベント キットに関するドキュメントを読みましたが、アプリで Google カレンダーのイベントを取得できません。デバイスから Google カレンダーのイベントを取得する方法に関するチュートリアルはありますか? Google イベント ID をアプリに取得する必要があります。誰かがこれを達成する方法を教えてもらえますか?
1 に答える
0
この答えは遅すぎるかもしれません。これが将来役立つことを願っています。
ネイティブ カレンダー データベースからイベントを取得するには、
EKEventStore *eventStore = [[EKEventStore alloc] init];
NSPredicate *fetchCalendarEvents = [eventStore predicateForEventsWithStartDate:startDate endDate:endDate calendars:nil];
//Use any specific calendar if you can provide detail. To get calendar detail, use the below code.
NSArray *eventListforDay = [NSArray arrayWithArray:[eventStore eventsMatchingPredicate:fetchCalendarEvents]];
使用可能なシステム/クラウド カレンダーからカレンダーを選択するには
NSArray *cals = [NSArray arrayWithArray:[eventStore calendarsForEntityType:EKEntityTypeEvent]];
for(EKCalendar *iCal in cals) {
if (iCal.source.sourceType == EKSourceTypeCalDAV && [iCal.source.title isEqualToString:YOUR_CALENDAR_TITLE]) {
//save calendar identifier for future use.
break;
}
}
于 2017-02-24T09:40:35.850 に答える