cordova-plugin-contacts icon indicating copy to clipboard operation
cordova-plugin-contacts copied to clipboard

App Crash with iOS 14

Open skdavies opened this issue 5 years ago • 2 comments

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

skdavies avatar Feb 06 '21 00:02 skdavies

Can you check if you have this with my Contacts Plugin aswell? https://github.com/EinfachHans/cordova-plugin-contacts-x

EinfachHans avatar Feb 10 '21 19:02 EinfachHans

I have the same problem but it's a simple fix. See the PR.

lukas2 avatar Feb 26 '21 13:02 lukas2

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.

timbru31 avatar Jan 09 '23 07:01 timbru31