问题
I am retrieving phoneNumbers
and I am getting a breakpoint. I've spent the past few hours trying to fix it, but still no luck.
-(void)textMessage{
ABAddressBookRef addressBook = ABAddressBookCreate();
NSMutableArray *array =[[NSMutableArray alloc]init];
NSMutableArray *temp;
NSMutableArray *temp2 = [[NSMutableArray alloc]init];
for(int i =0;i<[savedPeople count];i++){
NSString *temp = (NSString*) ABAddressBookCopyPeopleWithName(addressBook, (CFStringRef)[savedPeople objectAtIndex:i]);
NSLog(@"%@",temp);
[temp2 addObject:temp];
ABRecordRef thisPerson = (ABRecordRef)[temp2 objectAtIndex:i];
ABMultiValueRef phoneProperty = ABRecordCopyValue(thisPerson, kABPersonPhoneProperty);
NSLog(@"%@",phoneProperty);
}
array = temp2;
NSLog(@"%@",array);
CFRelease(addressBook);
}
![1] http://min.us/mQOzL3w5V
Anybody know what's wrong with it?
回答1:
Breakpoints are somthing that you set, not errors. Go to the breakpoint inspector:
And delete any entries you find there. You can also turn off breakpoints temporarily with the Breakpoints button:
or via the menu command Product>Debug>Deactivate Breakpoints.
来源:https://stackoverflow.com/questions/10406572/getting-breakpoint-retrieving-addressbook-data