.Request() won't show dialog after an initial denial of a permission
🐛 Bug Report
After denying a certain permission (in my case: camera), .request() doesn't show a dialog and hence won't let me allow the camera usage again. Btw the status of the permission is Denied, not PermanentlyDenied.
Expected behavior
Permission dialog shows up again.
Reproduction steps
Simple app to request camera permission.
Configuration
Version: 5.0.1+1
Platform:
- [x] :iphone: iOS
- [ ] :robot: Android
So, turns out, this is not a bug but the expected result on iOS (as per this SO answer).
post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', ## dart: PermissionGroup.camera 'PERMISSION_CAMERA=1' ] end end end
Add this in pod file and delete pod lock and pod install then it will work
Thanks @akhiljohny you saved my day.
Same case for android API 33. When permission dialog for external_storage/READ_MEDIA was set to "Deny" for second time the permission status came as denied instead of permanentlydenied. Any guess?