This is a migrated thread and some comments may be shown as answers.

Datasource and multiple calendars

1 Answer 49 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeff
Top achievements
Rank 1
Jeff asked on 02 Nov 2014, 06:16 PM
I added this to your EventKit data binding example code - shouldn't it produce an array of the available local calendars on the phone?

self.dataSource = [TKCalendarEventKitDataSource new];
    self.dataSource.delegate = self;
    
    NSLog(@"Calendars = %@",self.dataSource.calendars);


I need to be able to use the standard calendar plus a user created calendar, as an option.

Thanks,
Jeff

1 Answer, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 05 Nov 2014, 12:54 PM
Hi Jeff,

Thank you for contacting us.

TKCalendarEventKitDataSource's calendars property returns an array containing the available calendars on the phone, however the calendars are fetched asynchronously which causes the issue. Possible solution is to slow down the thread a bit while the calendars are being fetched. Please consider the following code snippet:
NSArray *calendars = self.dataSource.calendars;
[NSThread sleepForTimeInterval:0.5];
NSLog(@"%lu", calendars.count);

The issue will be addressed in our next release which is scheduled for the end of this month. I logged it in our feedback portal. Feel free to vote/comment. I updated also your Telerik points for reporting the issue.

If you need further assistance, I will be glad to help.

Regards,
Adrian
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Calendar
Asked by
Jeff
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Share this question
or