1

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?

Jasonw
  • 5,054
  • 7
  • 43
  • 48
danny huang
  • 155
  • 9
  • possible duplicate of ["Thread 1: stopped at breakpoint" error when initializing an NSURL object](http://stackoverflow.com/questions/10016890/thread-1-stopped-at-breakpoint-error-when-initializing-an-nsurl-object) – jscs May 02 '12 at 01:33

1 Answers1

0

Breakpoints are somthing that you set, not errors. Go to the breakpoint inspector: enter image description here

And delete any entries you find there. You can also turn off breakpoints temporarily with the Breakpoints button:

enter image description here

or via the menu command Product>Debug>Deactivate Breakpoints.

jscs
  • 63,694
  • 13
  • 151
  • 195
  • it still does not run/continue after i deactivate breakpoint, is this line wrong? ABMultiValueRef phoneProperty = ABRecordCopyValue(thisPerson, kABPersonPhoneProperty); – danny huang May 02 '12 at 01:39
  • Does it crash? What does the console say? – jscs May 02 '12 at 01:40
  • Well, that might be why you set a breakpoint in the first place. That's a completely different question, though. You'll need to do some debugging yourself and provide the stack trace when you ask about it. – jscs May 02 '12 at 01:45