Compilation failed, how to adapt iOS versions below 14.3
Post
Replies
Boosts
Views
Activity
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) {
}];
}
}
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) {
}];
}
}