RichieAdsController

@MainActor
public final class RichieAdsController

RichieAdsController is the main interface for loading ads with Richie SDK.

If possible, you should be using this class instead of RichieAds. RichieAds does not force usage from the main thread but strongly recommends it; this class forces the issue and defines itself to work on the main actor.

  • Initialize RichieAdsController.

    Declaration

    Swift

    public convenience init(
        appIdentifier: String
    )
  • Initialize RichieAdsController with a RichieAds instance.

    Declaration

    Swift

    public init(richieAds: RichieAds)
  • This method should be called before relinquishing last reference to a RichieAds instance. It allows RichieAds to nicely shut down and clean up.

    Declaration

    Swift

    public func invalidate()

Global persisted parameters

  • Global persisted parameters can be used by ad creatives (using JavaScript API) to query global state. This gives creatives the opportunity to communicate with each other, using simple string values. For example, one creative can set a value for a key when some action has been performed by the user, and then another creative can know that this event has occurred.

    Note

    Parameters are retained only for a limited duration. They will be cleaned after 30 days of inuse.

    Declaration

    Swift

    func setGlobalPersistedParameter(key: String, value: String?)
  • Returns value for a global persisted parameter.

    Declaration

    Swift

    func globalPersistedParameterValue(key: String) -> String?

Slot ads