CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
318 stars 229 forks source link

iOS app pemission doesn't work #147

Closed giovannicampagnolo closed 1 year ago

giovannicampagnolo commented 1 year ago

When I enter the ar view despite the camera permission being enabled, the plugin remains in the grant permission screen

-->this is my part of podfile i've added `post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'

Additional configuration options could already be set here

    # BEGINNING OF WHAT YOU SHOULD ADD
    config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
      '$(inherited)',

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

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

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

      ## dart: PermissionGroup.sensors
      'PERMISSION_SENSORS=1',

      ## dart: PermissionGroup.bluetooth
      'PERMISSION_BLUETOOTH=1',

      # add additional permission groups if required
    ]
    # END OF WHAT YOU SHOULD ADD
    end
    end
  end
end

end`

IMG_7023

JeroenMoonen commented 1 year ago

Had the same issue. As soon as you set the platform version higher than 13.0 there is no problem:

Your podfile:

platform :ios, '13.0'
giovannicampagnolo commented 1 year ago

On my podfile there is alrady the version '13.0' but didn't work

Schermata 2022-10-26 alle 09 24 51
giovannicampagnolo commented 1 year ago

the problem is on permission handler: when the app ask to software to grant permission the request remains permantlyDenaied

giovannicampagnolo commented 1 year ago

For solve the bug you need to make these changes to the ARView file after forked it

Schermata 2022-10-27 alle 17 35 23