getting breakpoint retrieving addressbook data

瘦欲@ 提交于 2020-01-30 09:32:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!