Capacitor Camera Plugin crashes app

App crashes when Camera.getPhotos or any other method on Camera. is called.

import { Camera } from '@capacitor/camera'

@capacitor/camera@npm:5.0.9 │ ├─ Instances: 1 │ └─ Version: 5.0.9

├─ @capacitor/cli@npm:5.1.0
│  ├─ Version: 5.1.0
├─ @capacitor/core@npm:5.1.0
│  ├─ Version: 5.1.0
│  │
1 Like

That is pretty vague. Assuming you’ve configured the proper permissions?

Have you looked at DevTools to see if there are any errors? What about the logs in XCode or Android Studio?

Hey, Yes. The required permissions have been configured on info.plist

  • NSCameraUsageDescription
  • NSPhotoLibraryAddUsageDescription
  • NSPhotoLibraryUsageDescription

There are no actual logs since the app is now just restarting not actually crashing and generating a report.

If you connect your phone to XCode and run the app in debug mode, XCode should show logs of everything going on.

1 Like

Did you solve it or found what is the cause of the problem? I am having the same problem with ios 17. I tried both with Capacitor 5 and 6, and this looks like it only happens in ios 17 lower versions of ios seems to work fine.