xcode16 beta not support iAd

May I ask how to adapt to devices using ADClient under iOS 14.3?

xcode version: 16.0 beta (16A5171c)

error message:Use of undeclared identifier 'ADClient'

 if (@available(iOS 14.3, *)) {
    NSError *error = nil;
    NSString *token = [AAAttribution attributionTokenWithError:&error];
  } else {
    if ([[ADClient sharedClient] respondsToSelector:@selector(requestAttributionDetailsWithBlock:)]) {
        [[ADClient sharedClient] requestAttributionDetailsWithBlock:^(NSDictionary<NSString *,
                                                                      NSObject *> * _Nullable attributionDetails,
                                                                      NSError * _Nullable error) {
            
        }];
    }
  }
Answered by dkcas11 in 794792022

iAds is entirely deprecated. To quote the documentation:

After February 7, 2023, all requests made to the Apple Search Ads iAd Attribution API will return with a value of "iad-attribution" = false, or errors. See requestAttributionDetails(_:). Use the AdServices framework for current attribution integration with the Apple Search Ads Campaign Management API for devices using iOS 14.3 and later. Attribution isn’t available for downloads and redownloads from devices using iOS 14.2 or earlier.

Accepted Answer

iAds is entirely deprecated. To quote the documentation:

After February 7, 2023, all requests made to the Apple Search Ads iAd Attribution API will return with a value of "iad-attribution" = false, or errors. See requestAttributionDetails(_:). Use the AdServices framework for current attribution integration with the Apple Search Ads Campaign Management API for devices using iOS 14.3 and later. Attribution isn’t available for downloads and redownloads from devices using iOS 14.2 or earlier.

xcode16 beta not support iAd
 
 
Q