iAd framework causes app termination on iOS 14 if user allowed to be tracked

Number:rdar://FB8454394 Date Originated:19th August 2020
Status:Closed Resolved:19th August 2020
Product:iAd / AppTrackingTransparency frameworks Product Version:
Classification: Reproducible:Yes
In iOS 14, user can be asked if they allow to be tracked with usage of AppTrackingTransparency framework. If user responds "Allow Tracking" in pop up dialog (ATTrackingManagerAuthorizationStatusAuthorized) and if attempt to communicate with iAd framework with usage of requestAttributionDetailsWithBlock: method is attempted, iOS terminates the app. In every subsequent app launch (dialog doesn't show up anymore, but state remains ATTrackingManagerAuthorizationStatusAuthorized), app will crash when requestAttributionDetailsWithBlock: is called. If state ever changes to ATTrackingManagerAuthorizationStatusDenied, attempt to call requestAttributionDetailsWithBlock: ends up in success.

Steps to reproduce:
1. Upon app launch, ask for consent to be tracked with usage of requestTrackingAuthorizationWithCompletionHandler: from AppTrackingTransparency framework.
2. Reply "Allow Tracking" in pop up dialog.
3. Attempt to invoke requestAttributionDetailsWithBlock: method of ADClient class (app will be terminated in this moment).


And turns out that this just got fixed in iOS 14 beta 5. o/

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!