3

Is there any way to know programatically that in iPhone Settings -> iCloud -> Calendars is switched off/on? Because in both case app is getting the iCloud in EKSource object.

    // Get the calendar source
EKSource* currentSource;
for (EKSource *source in eventStore.sources)
{
    if (source.sourceType == EKSourceTypeCalDAV &&
        [source.title isEqualToString:@"iCloud"])
    {/*True in two cases
      1. if iCloud Signed In and Calendars switch is On
      2. if iCloud Signed In but Calendars switch is Off*/

        currentSource = source;
        break;
    }
}
indu
  • 323
  • 2
  • 18

0 Answers0