It looks like you're new here. If you want to get involved, click one of these buttons!
-(BOOL)checkConsent:(BOOL) reset forUnderAge:(BOOL) underAge { // Create a UMPRequestParameters object. UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init]; UMPDebugSettings *debugSettings=[[UMPDebugSettings alloc] init]; debugSettings.testDeviceIdentifiers=<a href="https://forum.gideros.rocks/profile/%5B" rel="nofollow">@[</a> self.testID ]; parameters.debugSettings=debugSettings; // Set tag for under age of consent. NO means users are not under age // of consent. parameters.tagForUnderAgeOfConsent = underAge; if (reset) [UMPConsentInformation.sharedInstance reset]; // Request an update for the consent information. [UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:parameters completionHandler:^(NSError *_Nullable requestConsentError) { if (requestConsentError) { [AdsClass adConsent:[self class] with:requestConsentError.localizedDescription andCode:(int)requestConsentError.code]; return; } UMPConsentStatus consentStatus = UMPConsentInformation.sharedInstance.consentStatus; if (consentStatus == UMPConsentStatusRequired) { [UMPConsentForm loadWithCompletionHandler:^(UMPConsentForm * _Nullable consentForm, NSError * _Nullable error) { if (error) { [AdsClass adConsent:[self class] with:error.localizedDescription andCode:(int)error.code]; return; } [consentForm presentFromViewController:[AdsClass getRootViewController] completionHandler:^(NSError * _Nullable error) { if (error) { [AdsClass adConsent:[self class] with:error.localizedDescription andCode:(int)error.code]; return; } [AdsClass adConsent:[self class] with:<a href="https://forum.gideros.rocks/profile/%22%22" rel="nofollow">@""</a> andCode:0]; }]; }]; } }]; return TRUE; } |
UMPConsentStatus consentStatus = UMPConsentInformation.sharedInstance.consentStatus; if (consentStatus == UMPConsentStatusRequired) { ..... } |
Likes: MoKaLux