title: iPhone - How to fetch the contact detail using address book?
body: <p>I want to fetch the contact who have a birthday saved in the contact information and
  retrieve details of these contacts like phone numbers, emails, birthdate etc.</p>
  
  <p>Here is what I tried:</p>
  
  <pre><code>ABAddressBookRef myAddressBook = ABAddressBookCreate();
  NSArray *allPeople = (NSArray *)ABAddressBookCopyArrayOfAllPeople(myAddressBook);
  contactList = [[NSMutableArray alloc]init];
  
      for (id record in allPeople) 
      {
          NSMutableDictionary *newRecord = [[NSMutableDictionary alloc] init];
          CFTypeRef bDayProperty = ABRecordCopyValue((ABRecordRef)record, kABPersonBirthdayProperty);
  
          if (ABRecordCopyValue((ABRecordRef)record, kABPersonBirthdayProperty)) 
          {
                  NSDate *date=(NSDate*)bDayProperty;
                  [newRecord setObject:date forKey:@"birthDate"];
                  date=nil;
                 [date release];  
          }
        CFRelease(myAddressBook);
      }
  </code></pre>
  
  <p>any idea?</p>