My question is identical to this one by @theinternet, which never got a response and was closed.

I am trying to retrieve only certain fields from contacts, but the “fields” property doesn’t do anything.

Trying this:

    const contacts = await Expo.Contacts.getContactsAsync({
      fields: [Expo.Contacts.PHONE_NUMBERS, Expo.Contacts.EMAILS],
      pageSize: 0,
      pageOffset: 0,
      sort: sortType

Returns the entire contact object, not just the phone and emails.

And trying this (using a key naming that matches the returned object):

const contacts = await Expo.Contacts.getContactsAsync({
  fields: [Expo.Contacts.phoneNumbers, Expo.Contacts.emails, Expo.Contacts.lastName],
  pageSize: 0,
  pageOffset: 0,
  sort: sortType

Crashes expo.

For what its worth, my sorting object works and is defined as follows:

const sortType = Expo.Contacts.SortTypes.LastName;

I have tried using LastName in my fields as well and it also crashes expo.

Thanks in advance for any help with this.

In case it can save someone some time, here’s the code I used to parse the returned contact object into a simpler one with only the desired fields:

    var contactsCleaned = {}; = [];
    if ( > 0) {
      console.log(; => {
        var cleanContact = {};
        cleanContact.firstName = contact.firstName;
        cleanContact.lastName = contact.lastName;
        cleanContact.emails = contact.emails;
        cleanContact.phoneNumbers = contact.phoneNumbers;;

      console.log(contactsCleaned); => {

Sorry about the issues you’re running into. Could you please share the device OS and version of Expo?

I’m using expo SDK 30 on iOS 12.1 with Expo

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.