title: How to simply retrieve list of Contacts in iOS7?
body: <p>I need to retrieve list of <code>Contacts</code> in <code>iOS</code>.</p>
  
  <p>Here is my code that is not work.</p>
  
  <pre><code>NSMutableArray *myContacts = [[NSMutableArray alloc]init];
  
      CFErrorRef error = NULL;
      ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, NULL);
      if (addressBook!=nil)
      {
          NSArray *allContacts = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook);
  
          NSUInteger i = 0;
          for (i = 0; i&lt;[allContacts count]; i++)
          {
              Person *person = [[Person alloc] init];
              ABRecordRef contactPerson = (__bridge ABRecordRef)allContacts[i];
              NSString *firstName = (__bridge_transfer NSString*)ABRecordCopyValue(contactPerson, kABPersonFirstNameProperty);
  
              person.firstName = firstName;
              [myContacts addObject:person];
          }
          CFRelease(addressBook);
  
      }
      else
      {
          NSLog(@"Error");
  
      }
  </code></pre>
  
  <p>How can i get the list of <code>Contacts</code>?</p>