Skip to content

Reset

swift
public static func resetWelcomeAd(params: RingierAdBannerViewParams? = nil)

Resets the state of the welcome ad banner.

Parameters:

  • params: An optional RingierAdBannerViewParams object specifying the category and placement of the banner to reset. If nil, resets the state for all welcome ads.

Usage:

Call this method to clear the state of a specific welcome ad or all welcome ads, allowing the ad to be reloaded without restrictions from previous states.

Example

swift
// Reset state for a specific welcome ad
let params = RingierAdBannerViewParams(category: "welcome1", placement: "Home")
WelcomeAdBannerView.resetWelcomeAd(params: params)

// Reset state for all welcome ads
WelcomeAdBannerView.resetWelcomeAd()

TIP

For optimizing the testing process of your welcome ad integration, consider adding a feature to programmatically reset the welcome ad state (effectively making it eligible to display again) within a hidden, developer-only menu in your application.

This approach will significantly speed up your iteration cycle, as testers or developers won't have to manually trigger conditions (like clearing app data or waiting for a cool-down period) to re-test the ad display.