title: I am retrieving contact's multiple addresses but only want Home address
body: <p>Does anyone know how to retrieve the Home address from multiaddress in iOS? I have got permission from user and everything else but the problem is, I only want the Home address.</p>
  
  <pre><code>ABAddressBookRef addressBook = ABAddressBookCreate();
  __block BOOL accessGranted = NO;
  if (ABAddressBookRequestAccessWithCompletion != NULL) { // we're on iOS 6
      dispatch_semaphore_t sema = dispatch_semaphore_create(0);
      ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
          accessGranted = granted;
          dispatch_semaphore_signal(sema);
      });
      dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
      dispatch_release(sema);
  }
  else { // we're on iOS 5 or older
  
      accessGranted = YES;
  }
  
  if (accessGranted) {
  
      CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook);
  
      CFIndex nPeople = ABAddressBookGetPersonCount(addressBook);
  
      NSMutableArray *array = [[NSMutableArray alloc] init];
  
      for( int i = 0 ; i &lt; nPeople ; i++ )
  
      {
          NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
  
          ABRecordRef ref = CFArrayGetValueAtIndex(allPeople, i );
  
          // First Name
          NSString *fName = (__bridge NSString*)ABRecordCopyValue(ref, kABPersonFirstNameProperty);
  
          // Last Name
          NSString *lName = (__bridge NSString*)ABRecordCopyValue(ref, kABPersonLastNameProperty);
  
          // Phone
          ABMultiValueRef phoneMultiValue = ABRecordCopyValue(ref, kABPersonPhoneProperty);
          CFArrayRef allPhones = ABMultiValueCopyArrayOfAllValues(phoneMultiValue);
          NSMutableArray *phoneData = [NSMutableArray arrayWithArray:(__bridge NSArray*) allPhones];
  
          // Email
          ABMultiValueRef emailMultiValue = ABRecordCopyValue(ref, kABPersonEmailProperty);
          CFArrayRef allEmails = ABMultiValueCopyArrayOfAllValues(emailMultiValue);
          NSMutableArray *emailData = [NSMutableArray arrayWithArray:(__bridge NSArray*) allEmails];
  
          // Address
          ABMultiValueRef addressMultiValue = ABRecordCopyValue(ref, kABPersonAddressProperty);
  
          CFArrayRef allAddresses = ABMultiValueCopyArrayOfAllValues(addressMultiValue);
  
          NSMutableArray* addressData = [NSMutableArray arrayWithArray:(__bridge NSArray*) allAddresses];
  
          for ( int j = 0 ; j &lt; [addressData count]; j++) {
              if ([[addressData objectAtIndex:j] count] &gt; 0) {
  
                  if ([fName length] &gt; 0 || [lName length] &gt; 0) {
  
  
                      if ([fName length] &gt; 0) {
                          [dic setObject:fName forKey:@"FirstName"];
                      }
  
                      if ([lName length] &gt; 0) {
                          [dic setObject:lName forKey:@"LastName"];
                      }
  
                      if ([phoneData count] &gt; 0) {
                          [dic setObject:phoneData forKey:@"MultiplePhoneNumbers"];
                      }
  
                      if ([emailData count] &gt; 0) {
                          [dic setObject:emailData forKey:@"MultipleEmails"];
                      }
  
  
                      [dic setObject:addressData forKey:@"MultipleAddresses"];
  
  
  
                  }
              }
          }
  
          NSUInteger keyCount = [[dic allKeys] count];
          if (keyCount &gt; 0) {
  
              ABRecordID recId = ABRecordGetRecordID(ref);
  
  
              [dic setObject:[NSString stringWithFormat:@"%d",recId] forKey:@"ABRecordRef"];
              [dic setObject:[NSString stringWithFormat:@"%d",i] forKey:@"ab_id"];
              [dic setObject:[NSNumber numberWithBool:FALSE] forKey:@"is_coordinate_fetch"];
              [array addObject:dic];                
          }
  </code></pre>
  
  <p>I would really appreciate if anyone could take time and solve this for me.</p>