flutter-permission-handler
flutter-permission-handler copied to clipboard
Remove unused constant
🏗 Enhancement Proposal
Remove unused PERMISSION_PHOTOS_ADD_ONLY constant:
https://github.com/Baseflow/flutter-permission-handler/blob/2e47f05ae9dabee2bc671166301aa948259b39f2/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h#L60
It is confusing as it suggest it should be used for addOnly photos permission, while it does nothing and PERMISSION_PHOTOS is needed.
Platforms affected (mark all that apply)
- [x] :iphone: iOS
- [ ] :robot: Android
Dear @spkersten,
This seems like a good improvement. I'll label this as an enhancement.
Kind regards,
With PERMISSION_PHOTOS_ADD_ONLY=1, Permission.photosAddOnly.status keeps returning denied.
It looks like PERMISSION_PHOTOS_ADD_ONLY has no effect at all and actually, PERMISSION_PHOTOS needs to be enabled.
https://github.com/Baseflow/flutter-permission-handler/blob/842761c2aae2368ddd4811b3b12ede28ed2c8d62/permission_handler_apple/ios/Classes/strategies/PhotoPermissionStrategy.h#L9-L15
After that, Permission.photosAddOnly.status returns the correct value