I am attempting to access the anniversary date property from the contacts in address book. I have already accessed other properties such as the name and company. myPerson was created from a custom class, and it has an NSDate property called date.
ABAddressBookRef addressBook2 = ABAddressBookCreateWithOptions(NULL, NULL);
NSMutableArray *people = (__bridge NSMutableArray *)ABAddressBookCopyArrayOfAllPeople(addressBook2);
ABRecordRef r = (__bridge ABRecordRef)([people objectAtIndex:i]);
NSDateFormatter *dF = [[NSDateFormatter alloc]init];
[dF setDateFormat:@"dd-MM-yyyy"];
NSDate *dS = [[NSDate alloc] init];
dS=[dF dateFromString:(__bridge NSString *)(ABRecordCopyValue(r, kABPersonAnniversaryLabel))];
myPerson.date = dS;
The application builds but gives me an EXC_BAD_ACCESS error and an value conversion issue warning on the line where dS gets its value.