Crash when clicking Select Image to upload an image

更新时间:
复制 MD 格式

Problem description

The app crashes when you click "Select Image" to upload an image.

Solution

Ensure that the app has permission to access the camera and the photo library.

iOS: iOS 10 has stricter privacy rules. You must add a privacy description. Otherwise, your app may crash or be rejected during the review process.

Add the following fields to your info.plist file:

<key>NSCameraUsageDescription</key>
<string>Access the camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Access the photo library</string>

Android: The app requires permissions to access the photo album, camera, and microphone. For Android 6.0, you must implement your own method to request permissions. For earlier versions, a declaration in the manifest file is sufficient.