title: Swift iOS9 New Contacts Framework - How to retrieve only CNContact that has a valid email address?
body: <p>In the latest Contacts framework for iOS9, how to retrieve only CNContact that has a valid email address?</p>
  
  <p>Current code: </p>
  
  <pre><code>func getContacts() -&gt; [CNContact] {
      let contactStore = CNContactStore()
      let predicate: NSPredicate = NSPredicate(format: "")
      let keysToFetch = [CNContactGivenNameKey, CNContactFamilyNameKey, CNContactEmailAddressesKey]
  
      do {
          return try contactStore.unifiedContactsMatchingPredicate(predicate, keysToFetch: keysToFetch)
      } catch {
          return []
      }
  }
  </code></pre>