XMediatorAds
public class XMediatorAds
The class used to initialize and configure the sdk.
XMediator
is an ad mediation solution that enables integrating your app or game with many advertising partners.
Just initialize the SDK and start showing ads: banner
, interstitial
or rewarded
.
-
Entry point for displaying interstitial ads.
Declaration
Swift
public static let interstitial: InterstitialAds
-
Entry point for displaying rewarded ads.
Declaration
Swift
public static let rewarded: RewardedAds
-
Entry point for displaying banner ads.
Declaration
Swift
public static let banner: BannerAds
-
Entry point for interacting with the CMP provider.
Declaration
Swift
public static let cmpProvider: CMPProviderService
-
Initializes
XMediator
Sdk.Declaration
Swift
public static func startWith(appKey: String, initSettings: InitSettings = InitSettings(), initCallback: @escaping (Result<InitSuccess, InitError>) -> ())
Parameters
appKey
Your app or game app key. This is mandatory and cannot be null.
initSettings
An
InitSettings
object.initCallback
A callback called once the core of the SDK has been initialized.
-
Sets or updates user properties. This will replace all of the properties previously set.
Declaration
Swift
public static func setUserProperties(_ userProperties: UserProperties)
Parameters
userProperties
A
UserProperties
object containing the updated properties. -
Sets or updates consent information. This will replace all of the values previously set.
Declaration
Swift
public static func setConsentInformation(_ consentInformation: ConsentInformation)
Parameters
consentInformation
A
ConsentInformation
object containing the updated information. -
Returns the previously set consent information.
Declaration
Swift
public static func getConsentInformation() -> ConsentInformation
Return Value
consentInformation: A
ConsentInformation
object containing the applied consent information. -
Opens XMediator Debugging Suite.
Declaration
Swift
public static func openDebuggingSuite()