I was struggling with this for a while and this solution works for me. I am wondering though how did you figure it out? Is this documented somehow and I just did not understand it or is it just a quirk that everyone has to run into?
20 minutes later I have read the documentation once again. And this is clearly documented I just did not understand it:
"Calls to the API only prompt when the application state is UIApplicationStateActive." (https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorization)
sooooo frustrated and the worst part is I can not blame anyone else.
Well surely the rest of my day will not present me with frustrating obstacles. I mean coding rarely does. right...?