App Crash with iOS 14
Bug Report
Problem
The app crashes after the permissions window appears and you click "allow." If you re-open the app, the permission is granted and you can access the contacts correctly. Has anyone else seen this or know any fixes/forks that address this?
What is expected to happen?
The app will not crash after allowing contact permissions.
What does actually happen?
It crashes.
Information
I have set the NSContactsUsageDescription in Info.plist and see that when it prompts so I know that isn't the problem. From debugging the crash log there is an error that says:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Call must be made on main thread'
I suspect this is a problem with the way the plugin is implemented not using the main thread
Command or Code
The pickContact method being called for the first time in an app, causing the permissions window to appear. After accepting you should see the crash.
Environment, Platform, Device
All iOS devices on version 14 (could have been happening earlier but I didn't notice it).
Version information
Cordova 10, cordova-plugin-contacts 3.0.1 (latest)
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Can you check if you have this with my Contacts Plugin aswell? https://github.com/EinfachHans/cordova-plugin-contacts-x
I have the same problem but it's a simple fix. See the PR.
We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.