MPConsentDialogViewController

@interface MPConsentDialogViewController : UIViewController

An interface used to load the MoPub consent dialog.

Public Properties

/delegate

  • Description: Delegate object to inform an outside object of events.

  • Declaration:

    @property (nonatomic, weak) id<MPConsentDialogViewControllerDelegate> delegate;
    

Public Methods

- /initWithDialogHTML:

  • Description: Initializes a consent dialog view controller with an HTML string to load. It is expected that this initializer is used when initializing.

  • Declaration:

    - (instancetype)initWithDialogHTML:(NSString *)dialogHTML NS_DESIGNATED_INITIALIZER;
    
  • Parameters:

    • dialogHTML: The markup string for the consent dialog.

- /loadConsentPageWithCompletion:

  • Description: This method starts the loading of the consent page. When complete, the completion callback method will be called with a BOOL indicating success, and an NSError object with information about the error in the case of failure. This method can be called and is expected to be called before the view controller is presented. This way, the consent dialog is already loaded and in view by the time the user sees it.

  • Declaration:

    - (void)loadConsentPageWithCompletion:(void (^_Nullable)(BOOL success, NSError *error))completion;
    
  • Parameters: None.

Last updated February 11, 2020

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2020 MoPub (a division of Twitter, Inc.)