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

iOS 13 Support #95

Closed elliotfleming closed 4 years ago

elliotfleming commented 4 years ago

Hey, just a heads up - this package fails with the error cnerrordomain 102 in iOS 13 since it tries to access the note field, which now requires a special entitlement com.apple.developer.contacts.notes that's only available by submitting an application.

My fix was to simply comment out the two refererences to note in RNUnifiedContacts.swift.

...
// CNContactNoteKey
...
// addString(&contact, key: "note", value: cNContact.note)
...
joshuapinter commented 4 years ago

Interesting. So there's no way to obtain the notes without individually submitting an application to Apple?

elliotfleming commented 4 years ago

Their stance is that notes are a privacy issue since users put sensitive info there, so they're locking it down going forward. From what I can gather the people who've submitted applications haven't even been given a response. It could be one of those things where they're only going to allow the biggest players to play, but that's just speculation on my part.

Here's the first thread that popped up... ios-13-cncontacts-no-longer-working-to-retrieve-all-contacts

joshuapinter commented 4 years ago

Thanks for the additional info. I'm going to release a new major version since this will break existing apps using this library that are trying to access the .note attribute.

Then in a future version we can add an option to include it if the app using this library has request specific permission / entitlement for it.

Thanks!

joshuapinter commented 4 years ago

This has been merged into master and released to npm as v2.0.0-pre.2. Update your package.json accordingly or use master branch.

NOTE: You will no longer be able to access the note attribute of a Contact so update your app if you're doing that.

divyanshu013 commented 4 years ago

Hi @joshuapinter, are there any other breaking changes in v2.0.0-pre.2? I checked the release description but it didn't say anything. Just wanted to confirm. Thanks.

joshuapinter commented 4 years ago

Not sure at this point. I have fallen short on developing this and keeping up with the CHANGELOG. I'm hoping to change that during this self-isolation period.

divyanshu013 commented 4 years ago

I upgraded and haven't noticed any issues on iOS till now 😄

joshuapinter commented 4 years ago

🤞 :)