GoogleMobileAds Framework Reference

UMPConsentInformation

@interface UMPConsentInformation : NSObject

Consent information. All methods must be called on the main thread.

  • The shared consent information instance.

    Declaration

    Swift

    class var sharedInstance: UMPConsentInformation { get }

    Objective-C

    @property (readonly, nonatomic, nonnull, class) UMPConsentInformation *sharedInstance;
  • The user’s consent status. This value is cached between app sessions and can be read before requesting updated parameters.

    Declaration

    Swift

    var consentStatus: UMPConsentStatus { get }

    Objective-C

    @property (readonly, nonatomic) UMPConsentStatus consentStatus;
  • The user’s consent type. This value is cached between app sessions and can be read before requesting updated parameters.

    Declaration

    Swift

    var consentType: UMPConsentType { get }

    Objective-C

    @property (readonly, nonatomic) UMPConsentType consentType;
  • Consent form status. This value defaults to UMPFormStatusUnknown and requires a call to requestConsentInfoUpdateWithParameters:completionHandler to update.

    Declaration

    Swift

    var formStatus: UMPFormStatus { get }

    Objective-C

    @property (readonly, nonatomic) UMPFormStatus formStatus;
  • Requests consent information update. Must be called before loading a consent form.

    Declaration

    Swift

    func requestConsentInfoUpdate(with parameters: UMPRequestParameters?, completionHandler handler: @escaping UMPConsentInformationUpdateCompletionHandler)

    Objective-C

    - (void)
        requestConsentInfoUpdateWithParameters:
            (nullable UMPRequestParameters *)parameters
                             completionHandler:
                                 (nonnull
                                      UMPConsentInformationUpdateCompletionHandler)
                                     handler;
  • Clears all consent state from persistent storage.

    Declaration

    Swift

    func reset()

    Objective-C

    - (void)reset;