I am using image picker package to get image from camera or gallery. Most of the times it is working when I test it on real device, I run into that issue twice. it gave me this error App store rejected my app due to this crash with Guideline 2.1 - Performance - App Completeness
I added all required dependencies to info.plist, don't understand what the issue is
My pick image code
void pickFiles() async {
final imageSource = await pickImageDialog();
if (imageSource == null) {
return;
}
if (imageSource == ImageSource.camera) {
final XFile? image = await _picker.pickImage(source: imageSource, imageQuality: 10);
if (image == null) return;
paths = [];
paths.add(image.path);
} else {
final List<XFile> images = await _picker.pickMultiImage(imageQuality: 10);
_logger.wtf(images);
paths = [];
for (var image in images) {
paths.add(image.path);
}
}
try {
await uploadFiles();
_logger.wtf(filesLinks);
} on PlatformException catch (e) {
_logger.e('Unsupported operation$e');
} catch (e) {
_logger.e(e.toString());
}
update();
}
Dependencies in Info.plist
<key>NSMicrophoneUsageDescription</key>
<string>The app needs access to microphone to help chat with the transporter using audio messages</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>The app needs access to photo library to upload images of the items you would like to deliver or user picture</string>
<key>NSCameraUsageDescription</key>
<string>The app needs access to your camera so you can take pictures of the items you would like to deliver or user picture.</string>