flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

ios permission is denied, and the result is still returned as granted

Open lsfern opened this issue 6 years ago • 3 comments

🐛 Bug Report

ios permission is denied, and the result is still returned as granted

Expected return denied

Version: 5.0.0+hotfix.6

Platform:

  • [ ] :iphone: iOS iphone xs 13.5.1

lsfern avatar Jul 25 '20 09:07 lsfern

I also encountered this situation, my device is SE

hrongyong avatar Jul 28 '20 02:07 hrongyong

Hi, have you commented out the permissions required from your app in the Podfile, as mentioned in the setup? The ones that used, should be commented out

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      ... # Here are some configurations automatically generated by flutter

      # You can remove unused permissions here
      # for more infomation: https://github.com/BaseflowIT/flutter-permission-handler/blob/develop/permission_handler/ios/Classes/PermissionHandlerEnums.h
      # e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

        ## dart: PermissionGroup.calendar
        # 'PERMISSION_EVENTS=0',

        ## dart: PermissionGroup.reminders
        # 'PERMISSION_REMINDERS=0',

        ## dart: PermissionGroup.contacts
        # 'PERMISSION_CONTACTS=0',

        ## dart: PermissionGroup.camera
        # 'PERMISSION_CAMERA=0',

        ## dart: PermissionGroup.microphone
        # 'PERMISSION_MICROPHONE=0',

        ## dart: PermissionGroup.speech
        # 'PERMISSION_SPEECH_RECOGNIZER=0',

        ## dart: PermissionGroup.photos
        # 'PERMISSION_PHOTOS=0',

        ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
        # 'PERMISSION_LOCATION=0',

        ## dart: PermissionGroup.notification
        # 'PERMISSION_NOTIFICATIONS=0',

        ## dart: PermissionGroup.mediaLibrary
        # 'PERMISSION_MEDIA_LIBRARY=0',

        ## dart: PermissionGroup.sensors
        # 'PERMISSION_SENSORS=0'
      ]

    end
  end
end

pwnywiz avatar Jul 28 '20 15:07 pwnywiz

@LsFern did the solution mentioned above fix your problem? if so, please let us know so we can close the issue, thanks in advance!

JDDV avatar Mar 29 '21 13:03 JDDV