iOS Camera access issues in Developer mode on real device - PermissionStatus.permanentlyDenied

Xcode Version 16.3 (16E140) App developed in Flutter Flutter 3.29.3 Test iPhone device: iPhone 16 Pro running iOS 18.5

I have an app that requires Camera access. This used to work before with iOS 18.4.x. I have dumbed down my app to just get Camera permission. Even then it fails

flutter: Camera permission: PermissionStatus.denied
flutter: Photos permission: PermissionStatus.denied
flutter: Microphone permission: PermissionStatus.denied
flutter: --- End Debug Info ---
flutter: Loaded translations from asset for en_US
container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled
container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled
container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled
container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled
container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled
container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled
flutter: CAMERA PERMISSION STATUS: PermissionStatus.permanentlyDenied

Camera permissions don't show up in my App settings or under "Settings -> Privacy and Security -> Camera" and I am at loss to understand why this is happening.

Looks like I had to modify iOS/Podfile to make this work

# --- BEGIN: permission_handler camera macro ---
# The following block explicitly enables camera permission for the permission_handler plugin.
# Remove or comment out this block if you want to revert to default behavior.
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)',
        'PERMISSION_CAMERA=1', # <-- Explicitly enable camera permission
      ]
    end
  end
end
# --- END: permission_handler camera macro ---
iOS Camera access issues in Developer mode on real device - PermissionStatus.permanentlyDenied
 
 
Q