joshuapinter / react-native-unified-contacts

Your best friend when working with the latest and greatest Contacts Framework in iOS 9+ in React Native.
MIT License
158 stars 56 forks source link

import Contacts from 'react-native-unified-contacts'; #88

Closed unutoiul closed 5 years ago

unutoiul commented 5 years ago

When I import

import Contacts from 'react-native-unified-contacts'

the Contacts is undefined...any idea what should I do?

i've done react-native link react-native-unified-contacts

and is still undefined.

unutoiul commented 5 years ago

up

joshuapinter commented 5 years ago

Did you follow the README.md?

unutoiul commented 5 years ago

yes i did of course, how is possible to check if the react-native link was done well?

paintedbicycle commented 5 years ago

@unutoiul If the Automatic installation steps don't work for you, then follow the Manual steps. The manual steps also list what each of the relevant files should look like if react-native link was successful.

Beware that link often duplicates the installation of your libraries (nothing to do with this library, just how link seems to work).

Feel free to reopen this if it is indeed a bug in the docs or the library

unutoiul commented 5 years ago

Hi,

On the manual is saying that I need to

and drag the RNUnifiedContacts directory into your project directory in Xcode.

I don't have Xcode I'm using

https://github.com/react-community/create-react-native-app

and in their documentation is saying that I don't need to have Xcode installed...as is using Expo to publish on mobile(android/iphne)/simulator.

any idea other ideas?

still doesn't work for me. i get undefined when i import this library.

paintedbicycle commented 5 years ago

Hi @unutoiul - have you installed other 3rd party libraries with your system before this one and got them working? I think this is a general react-native installation problem and likely better for Stack Overflow or other sites.

But, to get you started, I can think of two things to begin your research with:

  1. Ejecting from Create React Native App

While it's much easier to develop without ejecting from RN, if you have not "ejected" from react-native-create-app, you cannot install 3rd party libraries like this one.

  1. Expo Compatibility

Expo doesn't support most 3rd party libraries: https://forums.expo.io/t/clarification-on-3rd-party-components-compatible-with-expo/388

mjlikre commented 4 years ago

Hey i followd the instructions on the manual one and the automatic one, but it doesnt seem to work for me