I'm using flutter to create an app for both ios and android. I need photos and storage permission for ios and android to access photos to update user profile pictures.
I used the permission_handler package to request permissions. And this works well in android but not in ios.
<key>NSPhotoLibraryUsageDescription</key>
<string>We need Photos access to allow you to update Profile Picture.</string>
var permission = Platform.isAndroid
? Permission.storage
: Permission.photos;
var permissionStatus = await permission.request();
print("isGranted: " +
permissionStatus.isGranted.toString() +
" isDenied: " +
permissionStatus.isDenied.toString() +
" isLimited: " +
permissionStatus.isLimited.toString() +
" isRestricted: " +
permissionStatus.isRestricted.toString() +
" isPermanentlyDenied: " +
permissionStatus.isPermanentlyDenied.toString());
flutter: isGranted: false isDenied: false isLimited: false isRestricted: false isPermanentlyDenied: true
I tried to uninstall and reinstall the app on the simulator (iPhone 12pro max) but still not able to request permission (show request popup).