Share your feedback and help shape the Google Mobile Ads SDK roadmap. Take the Google Mobile Ads SDK Annual Survey for 2023 before it closes on May 5th, 2023.

GoogleMobileAds Framework Reference

Stay organized with collections Save and categorize content based on your preferences.

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;