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

Container Support #38

Open elliotfleming opened 6 years ago

elliotfleming commented 6 years ago

When I use getContacts it returns contacts from all containers (e.g. gmail accounts, etc) but then I cannot act on those contacts (i.e. add them to iCloud groups).

Furthermore, if the user doesn't have iCloud selected as their default account in Settings > Contacts > Default Account, then adding a group fails (I guess bc it's trying to add to gmail container instead of iCloud?). Listing groups does however show all iCloud groups.

It seems like support for containers would mitigate both these issues (and perhaps more that I haven't stumbled across yet). Or maybe just default to the iCloud container always instead of complete container support?

P.S. I tried an app I found in the app store Groups by Qbix, Inc that does allow me to add non-iCloud contacts to iCloud groups as well as creating groups in iCloud when it's not the default account.

Thanks for your help and let me know whether or not this is something you have time to work on!

joshuapinter commented 6 years ago

Hi @elliotfleming! Thanks for your comment.

I haven't run into this issue myself but I think adding container support makes a lot of sense.

I'm not in a position to look into this myself right now but if you want to look into this yourself, I'll be happy to review and accept a Pull Request.

Thanks!

elliotfleming commented 6 years ago

Cool, I'll take a stab at it this weekend.