Skip to content

Instantly share code, notes, and snippets.

@nebiros
Created January 31, 2014 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nebiros/8741901 to your computer and use it in GitHub Desktop.
Save nebiros/8741901 to your computer and use it in GitHub Desktop.
NSArray *recordIds = [self.people valueForKey:@"recordID"];
NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[recordIds count]];
for (id recordId in recordIds) {
NSLog(@"recordId 1, %@", recordId);
NSLog(@"recordId 2, %@", @((ABRecordID) recordId));
NSLog(@"recordId 3, %d", (ABRecordID) recordId);
NSLog(@"recordId 4, %@", [NSNumber numberWithInt:(ABRecordID) recordId]);
ABRecordID r = (ABRecordID) recordId;
[arr addObject:[NSNumber numberWithInt:r]];
}
// log
2014-01-31 15:04:31.332 ThreeThings[24957:60b] recordId 1, 763
2014-01-31 15:04:31.333 ThreeThings[24957:60b] recordId 2, 399866224
2014-01-31 15:04:31.333 ThreeThings[24957:60b] recordId 3, 399866224
2014-01-31 15:04:31.334 ThreeThings[24957:60b] recordId 4, 399866224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment