Dear,
I have a strange problem:
When loading my contacts on an Iphone 6, running iOS 11.1.2, everything is working correctly.
But, when loading my contacts on an Iphone 8, running same the iOS 11.1.2, the app crashes completely.
What could be causing the issue?
I'm running react native version 0.48.4.
Thanks in advance!
No clue. Could you try reproducing the problem with https://github.com/morenoh149/react-native-contacts-test
I think it's related to request of access permissions to the contacts... could this be possible?
yes its possible, but I'm not sure
I met the same problem. Everything is correct in simulator, but in real devices, when it goes to get contacts, app crashes.
Have you added the request description to the Info.plist? ->
"An iOS app linked on or after iOS 10.0 must include in its Info.plist file the usage description keys for the types of data it needs to access or it will crash. To access Contacts data specifically, it must include NSContactsUsageDescription."
Is this thread should closed??
Closing due to lack of details. If you can share a minimal example that reproduces the problem we can reopen.
I found my problem when I debug with real device. It is caused by some data of null in contacts. You need to add some condition to solve it.
@zengkm We need to reproduce the issue. Please report back with the device model and screencaps and shared source code to reproduce.
I am using Iphone 8 and running OS IOS 13. I am trying to get allContacts in debug mode its working fine and return all contacts. But in release mode it was not working. It return only empty array.
@Renjithcse does the app crash? if not then it should be a separate issue.
Most helpful comment
I found my problem when I debug with real device. It is caused by some data of null in contacts. You need to add some condition to solve it.