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
XMediatorSdk.Declaration
Swift
public static func initialize(appKey: String, initSettings: InitSettings = InitSettings(), initCallback: @escaping (Result<InitSuccess, InitError>) -> (), mediationCallback: ((MediationResult) -> ())? = nil)Parameters
appKeyYour app or game app key. This is mandatory and cannot be null.
initSettingsAn
InitSettingsobject.initCallbackA callback called once the core of the SDK has been initialized.
mediationCallbackA 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
userPropertiesA
UserPropertiesobject 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
consentInformationA
ConsentInformationobject containing the updated information. -
Returns the previously set consent information.
Declaration
Swift
public static func getConsentInformation() -> ConsentInformationReturn Value
consentInformation: A
ConsentInformationobject containing the applied consent information.