I am looking for a way to touch a button in my Expo app that will enable me to browse & search through my iPhone contacts. I want to select a single contact and then be able to use that contacts data in my Expo app.
It would be the identical function to creating a new text message in the ‘Messages’ app on the iPhone. You click the ‘+’ icon and it shows you the name of all your contacts.You can scroll and search and eventually touch on one and their name is filled into the ‘To:’ field.
I am not sure if I would have to write the GUI to search, display, scroll and pick a contact (duplicate the functionality seen in the Messages app) or if we could actually get Expo to launch that already existing functionality and somehow tie into it.
I have been unable to find any existing Expo apps that browse contacts on an iPhone.
Hi there! Expo doesn’t come with a prebuilt Contacts Picker interface. At the moment your best bet would be to implement the UI yourself and use the Contacts API to get the data from the device.
I am aware of the docs and that code snippet, but I am looking to see a full example where I can see where this method should be placed, a caller calling it and then seeing an alert actually pop up in a demo Expo app.
I tried putting that async method (showFirstContactAsync) from the docs into the HomeScreen.js from the ‘Up and Running’ guide and I cannot get it to work, here is where I am now