Open fpaaske opened 5 years ago
@firescript do you know what could cause this issue, and if there's a workaround for iOS 13?
ios 13 has introduced new entitlement for accessing contacts, see details at https://stackoverflow.com/questions/57442114/ios-13-cncontacts-no-longer-working-to-retrieve-all-contacts
@liuy97 you are absolutely right. Removing request for notes solves the issue. @firescript you should consider throwing some error with relevant information when this happens. Now it just fails silently.
@mrpaaske Hello, can you say what exactly should i do to get the result in getAllContacts? I'm new in nativescript and mobile applications.
UPD: I got it, in getAllContacts we should pass array of fields. And don't ask for notes field. Example: .getAllContacts(['name', 'phoneNumbers'])
@xaosaki that's exactly it 👍
It seems that something is broken when using this library on iOS 13. The permission request pops up, and there are no error messages. But the response is always an empty list.
Same code on iOS 12 or below works fine.
To reproduce
add to Info.plist:
add to items.component.ts
Open multiple emulators from iOS 10 to iOS 13.
See that
contacts.data.length
is 0 for iOS 13.