0

According to this link: App Tracking Transparency Dialog does not appear on iOS,

RequestAuthorizationTracking()

should be called in:

applicationDidBecomeActive()

(See answer by El Tomato in that thread.)

Especially for iOS 15+. But in Unity the closest method is

public void OnApplicationFocus(bool focus)

But this is not called when the app starts up (on actual iOS device and in iOS Simulator), only when it goes to background and then foreground again.

So where should this code go:

ATTrackingStatusBinding.RequestAuthorizationTracking(this.DidCompleteAuthorizationTracking);
Bbx
  • 3,184
  • 3
  • 22
  • 33
  • Why not just put it in start and the appfocus? – BugFinder Sep 22 '22 at 19:34
  • I googled what you are asking and found another SO post. [Detecting when applicationDidBecomeActive in Unity](https://stackoverflow.com/questions/35663149/detecting-when-applicationdidbecomeactive-in-unity) – hijinxbassist Sep 22 '22 at 20:46
  • That post says "//App became active, will fire on application first focus" which unfortunately is not true on actual iOS devices. – Bbx Sep 22 '22 at 23:11
  • Can't put it in both Start and AppFocus because no way to reliably tell if it worked or not in Start. And the remaining setup code (initialising Ads in particular), can only be called after the Alert has completed. Would be good to know where it's supposed to go or where others have put it. – Bbx Sep 22 '22 at 23:14

0 Answers0