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

App Tracking Transparency prompt not showing on iOS 15

Open thegrxp opened this issue 2 years ago • 9 comments

🐛 Bug Report

I noticed the ATT prompt is not showing up on iOS 15. Not on the iOS Simulator and also not on my physical iPhone. See: https://www.reddit.com/r/iOSProgramming/comments/pt41jz/att_prompt_not_showing_on_ios_15/

Version: 8.1.6

Platform:

  • [x] :iphone: iOS 15

thegrxp avatar Sep 25 '21 14:09 thegrxp

Same here, and my job app has rejected review due to this.

Kurogoma4D avatar Oct 04 '21 03:10 Kurogoma4D

I'm in the same situation. My app was rejected and I can't upload because of this issue.

RafaelBarbosatec avatar Oct 05 '21 12:10 RafaelBarbosatec

It seems to work on my simulators now that I've upgraded to version 8.2.2. According to this ATTrackingManager.requestTrackingAuthorization stopped working in iOS 15 you're only supposed to call the permission request while the app is active (whatever that means). I call mine in the initState of the first class that is actually really displayed after the splash screen after a bunch of other permission requests.

Maybe it could be helpful if you could share the code where you call your permission request.

Pherne avatar Oct 06 '21 11:10 Pherne

version 8.2.2

I called my permission request in initstate. It was working perviously on IOS 14.x, now not working in IOS 15 anymore.

**Update: For IOS 15, default settings "Allow Apps to Request to Track" is disabled. That's why you will not see the ATT prompt. Need to enable it then you can see whether the ATT prompt is showing.

speedlightwp avatar Oct 10 '21 03:10 speedlightwp

Same problem, v8.2.5 All permissions requests (camera, contact, trackings...) in iOS device and simulator doesn't works after iOS 15 update.

  1. Allow Apps to Request to Track is enabled;
  2. Prompt doesn't show in initState, after delays, or user button tap interactions;
  3. After update AppDelegate calling the ATTrackingManager.requestTrackingAuthorization with delay, the native prompt show up and user can allow the tracking. But the permission handler flutter requests still returning PermissionStatus.permanentlyDenied.

Podfile:

target.build_configurations.each do |config|   
    
    old_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
    new_target = project_deployment_target
    
    next if old_target == new_target
    next if old_target == nil      

    # puts "    #{config.name}: #{old_target.yellow} -> #{new_target.green}"
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = new_target
    config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = "NO"
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

      # You can enable the permissions needed here. For example to enable camera
      # permission, just remove the `#` character in front so it looks like this:
      #
      # ## dart: PermissionGroup.camera
      # 'PERMISSION_CAMERA=1'
      #
      #  Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

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

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

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

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

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

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

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

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

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

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

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

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

        ## dart: PermissionGroup.appTrackingTransparency
        'PERMISSION_APP_TRACKING_TRANSPARENCY=1',

        ## dart: PermissionGroup.criticalAlerts
        # 'PERMISSION_CRITICAL_ALERTS=1'
      ]    
  end




ernesto avatar Nov 02 '21 15:11 ernesto

Same here as well. requestTrackingAuthorization is not working in ios 15

usaikoo avatar Dec 13 '21 11:12 usaikoo

This still issue with v8.3.0... When will it be fixed?

noneed52 avatar Feb 20 '22 13:02 noneed52

i found it, in the settings go to privacy and then tracking and allow for tracking and it stops being permanently denied

jay2jp avatar Jun 11 '22 18:06 jay2jp

it happened with me as well. the issue is it does not work the first time one opens the app. so install the app. login and then close the app completely and then start it again it will show the prompt. I have used this as a solution the app reviewers and they accepted my app

hassanbasri avatar Jul 06 '22 09:07 hassanbasri

I encountered the same issue, the prompt isn't being displayed on iOS 15.5 even with Allow Apps to Request to Track enabled under Settings > Privacy. I ended up using app_tracking_transparency plugin instead.

omatt avatar Sep 29 '22 02:09 omatt

so, how about conclusion with this case?

michaelsof47 avatar Oct 10 '22 02:10 michaelsof47

same issue , any update here ?

moesaid avatar Mar 27 '23 20:03 moesaid

I have just tested v10.2.0 for the ATT prompt and it shows correctly in all applicable iOS versions.

iOS tested
13.7 ⛔️ ATT not supported before iOS 14
14.4
15.5
16.3
16.4

techouse avatar May 18 '23 17:05 techouse

It seems to us that this issue is no longer valid or solved in the meantime. Therefore, we will close this issue. Feel free to reopen the issue when it reappears or if it has not been resolved. Also please inform us about the steps to reproduce and possibly the output of flutter doctor -v.

TimHoogstrate avatar Aug 04 '23 07:08 TimHoogstrate