title: How can I get all phone numbers from addressbook IOS 5 KABPersonPhoneProperty
body: <p>I am using kABPersonPhoneProperty to get the iPhone "phone numbers" from the address book. However, once I run the program and only one phone number appears even the contact person has mobile, home and iphone numbers. Please help and I hope can get all phone numbers from every contact. Thanks.</p>
  
  <p>The full method:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      static NSString *simpleTableIdentifier = @"SimpleCell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
  
      if (cell == nil) {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
      }
      // cell.textLabel.text = [people objectAtIndex:indexPath.row];
  
      ABRecordRef record = (__bridge   ABRecordRef) [people objectAtIndex:[indexPath row]];
  
      NSString *firstName = (__bridge_transfer NSString*)ABRecordCopyValue(record, kABPersonFirstNameProperty);
  
      NSString *lastName = (__bridge_transfer NSString*)ABRecordCopyValue(record, kABPersonLastNameProperty);
  
      NSLog(@"FirstName %@, LastName %@", firstName, lastName);
  
      cell.nameLabel.text = [NSString stringWithFormat:@"%@ %@", firstName, lastName];
  
      ABMultiValueRef mainPhone = ABRecordCopyValue(record, kABPersonPhoneProperty);
      for (CFIndex i = 0; i &lt; ABMultiValueGetCount(mainPhone); i ++) {        
  
          NSString *phoneMobileNumber = (__bridge_transfer NSString*)ABMultiValueCopyValueAtIndex(mainPhone, i);
  
          cell.telNo.text = [NSString stringWithFormat:@"%@ %@" , home, phoneMobileNumber];
  
          NSLog(@"%@,%@", home, phoneMobileNumber);
      }
  
  return cell;
  
  }
  </code></pre>