5

I am try upload my app in the apple store but i am get some erros like:

Your app uses the AppTrackingTransparency framework, but we are still unable to locate the App Tracking Transparency permission request when reviewed on iOS 15.3.1.

I am using the expo-tracking-transparency

but when I test in the simulator it works but when I try to test in testFlight the pop up does not appear

how i am using in the code:

useEffect(() => {
    hideLoad();
    (async () => {
      const { status } = await requestTrackingPermissionsAsync();
      if (status === 'granted') {
        // Analytics.setAnalyticsCollectionEnabled(true);
      }
    })();
 ...
},[]);

i put this code in the index.js

Rafael Elias
  • 53
  • 1
  • 3

1 Answers1

3

After finding this answer, where Apple's documentation says that it should be placed in the applicationDidBecomeActive, it seems like the issue is that the app isn't active.

My fix was to add a timeout around the request to wait until the application is loaded:

setTimeout(async () => {
  const { granted } = await requestTrackingPermissionsAsync();
}, 500);

Another option is to add an event listener and see when the application is active through Expo App State and call it then.

ouflak
  • 2,458
  • 10
  • 44
  • 49
Neira
  • 46
  • 4