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

Update README.md #46

Closed fabioselau077 closed 11 months ago

fabioselau077 commented 12 months ago

I recently got an update denied and it was because the requestTrackingAuthorization() was after the Firebase init. Apple testers can detect that you made a request before the modal appears.

deniza commented 12 months ago

Thanks for the update on this issue, but I highly doubt that the order of initializing Firebase and requesting tracking authorization is the root of the problem that some users are facing during app review.

In our apps, we initialize Firebase as one of the first things we do, even before laying out any UI (we do this before calling runApp). Requesting tracking authorization is usually done from a widget's init function. So, the usual order is:

1) Initialize Firebase 2) runApp(...) 3) Request tracking authorization

I have two published apps that follow this same ordering, and we have not had any problems with app review so far. One of these apps was recently updated two weeks ago.

fabioselau077 commented 12 months ago

Thanks for the update on this issue, but I highly doubt that the order of initializing Firebase and requesting tracking authorization is the root of the problem that some users are facing during app review.

In our apps, we initialize Firebase as one of the first things we do, even before laying out any UI (we do this before calling runApp). Requesting tracking authorization is usually done from a widget's init function. So, the usual order is:

  1. Initialize Firebase
  2. runApp(...)
  3. Request tracking authorization

I have two published apps that follow this same ordering, and we have not had any problems with app review so far. One of these apps was recently updated two weeks ago.

I put the permission after firebase init and after months it was refused because of wrong modal implementation. I spent several days discussing with the Review Team, because when opening it through the Simulator or physical iOS, it appeared correctly and they rejected it 3x. After the last decline I checked that I had changed the order, so I went back to get the permission before Firebase init and the app passed without a problem, which is why I figured that would be the problem. But I made the PR just as a note in case someone has this problem.

Another thing, I only use Sentry to track bugs (which does not identify the user), do you think I need this tracking permission? I use Firebase Core (for use only with Firebase Dynamic Links) and Sentry in the app. I don't use Analytics or admob.