GoogleMobileAds Framework Reference

UMPConsentForm

@interface UMPConsentForm : NSObject

A single use consent form object.

  • Loads a consent form and calls completionHandler on completion. Must be called on the main queue.

    Declaration

    Swift

    class func load() async throws -> UMPConsentForm

    Objective-C

    + (void)loadWithCompletionHandler:
        (nonnull UMPConsentFormLoadCompletionHandler)completionHandler;
  • Unavailable. Use +loadWithCompletionHandler: instead.

    Declaration

    Objective-C

    - (nullable instancetype)init;
  • Presents the full screen consent form over viewController. The form is dismissed and completionHandler is called after the user selects an option. UMPConsentInformation.sharedInstance.consentStatus is updated prior to completionHandler being called. completionHandler is called on the main queue.

    Declaration

    Swift

    func present(from viewController: UIViewController) async throws

    Objective-C

    - (void)presentFromViewController:(nonnull UIViewController *)viewController
                    completionHandler:
                        (nullable UMPConsentFormPresentCompletionHandler)
                            completionHandler;