Skip to content

Instantly share code, notes, and snippets.

@Kursulla
Created June 21, 2013 09:40
Show Gist options
  • Save Kursulla/5830107 to your computer and use it in GitHub Desktop.
Save Kursulla/5830107 to your computer and use it in GitHub Desktop.
ACAccount getting user_id
ACAccount *account=nil;
NSArray *accountsArray = [accountStore accountsWithAccountType:accountType];
if([accountsArray count]>0){
account=[accountsArray objectAtIndex:0];
}
NSDictionary *tempDict = [[NSMutableDictionary alloc] initWithDictionary:
[account dictionaryWithValuesForKeys:[NSArray arrayWithObject:@"properties"]]];
NSString *userId = [[tempDict objectForKey:@"properties"] objectForKey:@"user_id"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment