iphone - How to get calendar provider (Google, Apple, Yahoo etc.) from EKEventStore -


i'm pulling calendars synced on device eventkit framework , getting calendar title myname@gmail.com in ekcalendar object great! must know service provider account. ww have if suffix "@gmail.com" know google account, google account "@mycoolsite.com" here? how can service provider system?

here how account title:

    ekeventstore * eventstore = [[ekeventstore alloc] init]; nsmutablearray*calendars = [[nsmutablearray alloc]init]; [eventstore requestaccesstoentitytype:ekentitytypeevent completion:^(bool granted, nserror *error) {     if (granted)     {         dispatch_async(dispatch_get_main_queue(), ^{             nsarray * accountsarray = [eventstore calendarsforentitytype:ekentitytypeevent];// ios 6 ^               (int = 0; < [accountsarray count]; i++) {                 nsstring *cal = [[accountsarray objectatindex:i] valueforkey:@"title"];                 if ([cal rangeofstring:@"@"].location != nsnotfound) {                     [calendars addobject:[[accountsarray objectatindex:i] valueforkey:@"title"]];                 }             }             [self gotcalendars:calendars];         });     } 

you can't service provider, can detect kind of service used looking sourcetype in eksource.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -