I'm using the multi_image_picker2
library. It is functioning fine, however there is no option to access camera or photo library (iOS specific here).Here is a snippet of my code:
import 'dart:typed_data';
import 'package:multi_image_picker2/multi_image_picker2.dart';
class ImagePickerFacade {
Future<List<Asset>?> loadImage() async {
try {
var resultList = await MultiImagePicker.pickImages(
maxImages: 300,
enableCamera: true,
cupertinoOptions: const CupertinoOptions(takePhotoIcon: "chat"),
);
if (resultList.isEmpty) {
return null;
} else {
return resultList;
}
} on NoImagesSelectedException catch (e) {
// User pressed cancel, update ui or show alert
print(e);
} on Exception catch (e) {
// Do something
print(e);
}
}
}
I have also included the following keys in my Info.plist
file:
<key>NSCameraUsageDescription</key>
<string>App requires access to your phone camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>App requires access to your phone audio.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App requires access to your phone photo library.</string>
I have tested my app using iOS 10, iOS 13, iOS 9 and the problem still persists. I also tried entering the keys above through XCode instead of manually through the Info.plist
file, however nothing seems to work. This is what I currently see when the image picker pops up:
Here is a link to the package I am using: https://pub.dev/packages/multi_image_picker2
Cheers