[SOLVED]: image_picker crashed without errors when picking an image iOS

image-picker-crashed-without-errors

When you work with image_picker, sometimes it might crash without any reason or error on the iOS Simulator or iOS Device. This is most time happens when you just getting started and you forget to add important information to the info.plist

Solution: Add NSPhotoLibraryUsageDescription to info.plist

To solve this crash on iOS Simulator or real device make sure you add NSPhotoLibraryUsageDescription, NSMicrophoneUsageDescription, and NSCameraUsageDescription to info.plist

Here is the code below

<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>

<key>NSMicrophoneUsageDescription</key>
<string>This app does not require access to the microphone.</string>

<key>NSCameraUsageDescription</key>
<string>This app requires access to the camera.</string>

You May Also Like

Leave a Reply

Your email address will not be published.

16 + 16 =