【问题标题】:getting breakpoint retrieving addressbook data获取断点检索地址簿数据
【发布时间】:2012-05-02 01:28:46
【问题描述】:

我正在检索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

有人知道这是怎么回事吗?

【问题讨论】:

标签: objective-c ios xcode abaddressbook


【解决方案1】:

断点是您设置的东西,而不是错误。转到断点检查器:

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

或通过菜单命令 Product>Debug>Deactivate Breakpoints。

【讨论】:

  • 我停用断点后它仍然无法运行/继续,这行错了吗? ABMultiValueRef phoneProperty = ABRecordCopyValue(thisPerson, kABPersonPhoneProperty);
  • 它会崩溃吗?控制台说什么?
  • 嗯,这可能就是你首先设置断点的原因。不过,这是一个完全不同的问题。您需要自己进行一些调试,并在询问时提供堆栈跟踪。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-06-28
  • 2014-09-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多