获取断点检索地址簿数据

时间:2012-05-02 01:28:47

标签: objective-c ios xcode abaddressbook

我正在检索phoneNumbers并且我正在获得断点。我花了几个小时试图解决它,但仍然没有运气。

-(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

有人知道它有什么问题吗?

1 个答案:

答案 0 :(得分:0)

断点是你设定的东西,而不是错误。转到断点检查器: enter image description here

并删除您在那里找到的所有条目。您还可以使用“断点”按钮暂时关闭断点:

enter image description here

或通过菜单命令Product&gt; Debug&gt; Deactivate Breakpoints。