Skip to content

Instantly share code, notes, and snippets.

@nebiros nebiros/gist:8741901
Created Jan 31, 2014

Embed
What would you like to do?
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
You can’t perform that action at this time.