tags:

views:

25

answers:

1

CFArrayGetValueAtIndex im not able to retrieve the value from address book when i tried accessing i get error

ABAddressBookRef addressBook= ABAddressBookCreate(); // this will open the AddressBook of               the iPhone
CFArrayRef people = ABAddressBookCopyArrayOfAllPeople(addressBook); // this copies all the contacts from the Address Book into the array

for (int i =0 ;i<ABAddressBookGetPersonCount(addressBook);i++)
{
  ABRecordRef ref = CFArrayGetValueAtIndex(people, i);
  NSString *AddBookfirstName = (NSString *)ABRecordCopyValue(ref,kABPerson);
}

this i variable returns statement telling ??? what is the problem here im not able to get the address book value

A: 

hey thanks i was trying to debug keeping in release mode it worked fine changing in the project settings to debug mode

Pinky