Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17158

Creating a Contact with React Native & Expo Contacts defaults to Business Contact Instead of Personal Contact in IOS

$
0
0

I am using React Native and Expo for building my application. In it, I use a library called Expo Contacts which allow you to manage device contacts (https://docs.expo.dev/versions/latest/sdk/contacts/#contactsremovecontactasynccontactid).

I am creating contacts with almost every possible field filled, but for some reason, the contacts default to business contacts instead of personal contacts. I know this because the default contact icon is an office building graphic and the company name appears in bold while the first and last name appear in smaller text. I want it to be a personal icon instead.

Here is some sample code that creates a contact:

const contact = {  [Contacts.Fields.FirstName]: 'John',  [Contacts.Fields.LastName]: 'Doe',  [Contacts.Fields.Company]: 'Company 123',};const contactId = await Contacts.addContactAsync(contact);

When I go to view the contact on IOS, it looks like this:

Screenshot of Contact Details

On the home screen, it only shows the company name:

Screenshot of Contact Home Page

Again, I just want a personal contact. Does anyone know how to fix this?

I tried inputting a job position and some other fields but it still thinks it is a business profile. I coulden't find anything on the documentation about this, either.


Viewing all articles
Browse latest Browse all 17158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>