I’m on SDK 39.0 with expo-contacts version 8.6.0.
On iOS Expo app (not simulator), the contacts from my phone are showing 95% of the time with a countryCode value of “md”, the country I am currently in. The country code was not set for most of these numbers and if they were set, then it would be set for “us”.
Here are some examples of the output I get right after I call “getContactsAsync”.
const f = Contacts.Fields;
let { data: contactsFromDevice } = await Contacts.getContactsAsync({
fields: [f.ID, f.Name, f.PhoneNumbers, f.ImageAvailable],
});
Object {
"contactType": "person",
"firstName": "Vik",
"id": "D417FAF1-BFE3-429B-919C-DEAD3FF50BD3",
"imageAvailable": false,
"name": "Vik",
"phoneNumbers": Array [
Object {
"countryCode": "md",
"digits": "4081234567",
"id": "9F710168-8243-4D4D-9A2A-F6C095E2BC24",
"label": "mobile",
"number": "4081234567",
},
],
},
Object {
"contactType": "person",
"firstName": "Alison",
"id": "2C5AB54F-D3CD-4376-A9AD-37733435341445",
"imageAvailable": false,
"name": "Alison",
"phoneNumbers": Array [
Object {
"countryCode": "md",
"digits": "14081234567",
"id": "7122CD6A-38ED-48A9-883C-36FBBFGKJH4EF7",
"label": "mobile",
"number": "14081234657",
},
],
},
In summary:
- Expo in Simulator: Works fine
- Expo on Android: Works fine
- Expo on iOS: Broken
I can’t really test easily on standalone iOS because of the OTA release-channel issue in SDK 39.
Has anyone ever seen an issue like this?