---
title: "#187: Picking Contacts with EPContactsPicker 👥"
url: https://littlebitesofcocoa.com/187-picking-contacts-with-epcontactspicker
author: Jake Marsh
date: 2016-02-09
published: 2016-02-09
topics: ["Libraries","Contacts"]
description: "In iOS 9, the Contacts framework replaced AddressBook.framework as the suggested way to interact with that data."
---

# #187: Picking Contacts with EPContactsPicker 👥

By Jake Marsh, February 9, 2016. HTML: https://littlebitesofcocoa.com/187-picking-contacts-with-epcontactspicker

<img src='https://media.littlebitesofcocoa.com/bite-assets/187-picking-contacts-with-epcontactspicker-example.png' style='max-width: 221px; float: right; margin-left: 20px; margin-bottom: 20px;' />

In **iOS 9**, the **Contacts** framework replaced **AddressBook.framework** as the suggested way to interact with that data. Today we'll check out a library called [EPContactsPicker](https://github.com/ipraba/EPContactsPicker), which is built on top of the **Contacts framework** and encapsulates a lot of the boilerplate logic. Let's dive in.

``` swift
let contactPickerVC = EPContactsPicker(
  delegate: self,
  multiSelection: true,
  subtitleCellType: SubtitleCellValue.Email
)

let nc = UINavigationController(rootViewController: contactPickerVC)
presentViewController(nc, animated: true, completion: nil)
```

Pretty simple! We can add a **delegate function** to grab the contact or contacts that were selected:

``` swift
func epContactPicker(_: EPContactsPicker, didSelectMultipleContacts contacts: [EPContact]) {
  for contact in contacts {
    print("\(contact.displayName())")
  }
}
```

More info about _EPContactsPicker_ can be found at [git.io/contactspicker](http://git.io/contactspicker)
