XMediatorSdk
public class XMediatorSdk
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
.
-
Initializes
XMediator
Sdk.Declaration
Swift
public static func initialize(appKey: String, initSettings: InitSettings = InitSettings(), initCallback: @escaping (Result<InitSuccess, InitError>) -> (), mediationCallback: ((MediationResult) -> ())? = nil)
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.
mediationCallback
A callback called once the mediation partners of the SDK have 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. -
Opens XMediator Debugging Suite.
Declaration
Swift
public static func openDebuggingSuite()
-
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.