Reputation: 1
How do I change the name of a calendar? I have:
EKCalendar *cal;
cal=[store calendarWithIdentifier:@"5F9A5BE0-03A9-4FE8-BD1E-2647F39E268F"];
cal.title = @"Calendar custom 2";
cal.source = localSource;
NSError *error = nil;
BOOL saved = [store saveCalendar:cal commit:YES error:&error];
NSLog(@"%d -> %@",saved,error);
But this doesn't save, this print:
0 -> Error Domain=EKErrorDomain Code=15 "That calendar may not be moved to another account." UserInfo=0xb05c8a0 {NSLocalizedDescription=That calendar may not be moved to another account.}
Someone could help me!!
Upvotes: 0
Views: 273
Reputation: 19
I too faced the same problem. The issue is that, you should not be setting the source for existing calendar. EKSource should only be set while creating new calendar.
Upvotes: 0
Reputation: 1551
According to documentation source
can't be changed, try changing title
property only.
Upvotes: 2