deniza / app_tracking_transparency

A Flutter plugin to show ios 14+ tracking authorization dialog.
https://pub.dev/packages/app_tracking_transparency/
MIT License
83 stars 28 forks source link

ATT Not Working on IOS 15.1 #23

Closed zoozobib closed 2 years ago

zoozobib commented 2 years ago

We have got a message from app store.

"We're looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 15.1."

SinoMiles commented 2 years ago

same issue

saigkl commented 2 years ago

same issue

deniza commented 2 years ago

Do you have any chance to test it on your own device running ios 15.1? I can not find a problem when testing in my test devices.

Do your app use remote or local notifications, I mean, do you also request notification permission on app launch?

SinoMiles commented 2 years ago

@deniza I have tested it on my iPhone 12 ios 15.1.1, didn't show the dialog I don't use notifications . Look at the link below. I have changed the swift code.it works now. https://github.com/deniza/app_tracking_transparency/issues/22#issuecomment-958761305

deniza commented 2 years ago

I just tested the example coming with app_tracking_transparency package on my ios 15.1 device (iPhone 11). Everything seems working fine. The only difference between the code you mentioned and our implementation is that our implementation first checks the tracking status by calling AppTrackingTransparency.trackingAuthorizationStatus and if it is notDetermined then shows the dialog. This is the only way if we want to show a custom explainer dialog before the official tracking dialog. (Google recommends this approach btw.) If you do not want to show a custom explainer dialog then its fine to call AppTrackingTransparency.requestTrackingAuthorization directly after app launch. Apple's official documentation also recommends checking tracking status first as stated here

Could you please run the example code that comes with the package on your own test device?

barisozbey commented 2 years ago

Do you have any chance to test it on your own device running ios 15.1? I can not find a problem when testing in my test devices.

Do your app use remote or local notifications, I mean, do you also request notification permission on app launch?

@deniza I'm requesting notification permission and ATT on app launch. Im requesting notification first and i got exactly same answer from Apple. Do you have any idea about that?

deniza commented 2 years ago

@barisozbey You could use a delayed call, ie Future.delayed(Duration(seconds: 1), () { request ATT here }), or show a custom explainer dialog first, like in example.

zoozobib commented 2 years ago

@barisozbey You could use a delayed call, ie Future.delayed(Duration(seconds: 1), () { request ATT here }), or show a custom explainer dialog first, like in example.

thanks , it is working

usaikoo commented 2 years ago

It working when you place the ATT request code in home page after splash or main page. Do not call directly in main page, as for me, I place the ATT request code in my home page after main page is called, then splash page is called again after this, my home page is called with custom pop up ATT request alert.

h4h13 commented 2 years ago

@deniza Is this solution can be applied for iOS 15.3

Anyone facing ATT is not working on iOS 15.3

deniza commented 2 years ago

@h4h13 You could use delayed function call trick, but, I highly recommend using explainer dialog approach, like in the example. This is also recommended by google.

h4h13 commented 2 years ago

@deniza Correct me if I'm wrong, we have moved the ATT request from app launch to button click and it's still not showing in the prod builds and app store is rejecting because of that.

At the movement we can't add explainer dialog because of product requirement

deniza commented 2 years ago

What happens when you execute the code below? You should see ATT dialog after you install a fresh copy of your app.

AppTrackingTransparency.requestTrackingAuthorization();

What you get when you execute the code below? What is the value of status variable?

final status = await AppTrackingTransparency.trackingAuthorizationStatus;

Touchunit commented 2 years ago

@deniza Is this solution can be applied for iOS 15.3

Anyone facing ATT is not working on iOS 15.3

yes same issue