MobileAds
@objc(YMAMobileAds)
@objcMembers
public class MobileAds : NSObject
Undocumented
-
Enables logging. By default, logging is disabled.
Declaration
Swift
public static func enableLogging() -
Returns the SDK version in the X.YY format.
Declaration
Swift
public static func sdkVersion() -> StringReturn Value
The version of the SDK in X.YY format.
-
Undocumented
Declaration
Swift
public static func audioSessionManager() -> AudioSessionManager -
The SDK automatically collects location data if the user allowed the app to track the location. This option is enabled by default.
Declaration
Swift
public static func setLocationTrackingEnabled(_ enabled: Bool)Parameters
enabledEnables or disables collecting location data.
-
Set a value indicating whether user is a child or undefined age. If the value is set to true personal data will not be collected.
Declaration
Swift
public dynamic static func setAgeRestrictedUser(_ restricted: Bool) -
Enables/disables the incorrect integration indicator for native advertising.
Remark
By default, the indicator of incorrect integration (for native ads) is enabled for theDeviceType.simulatordevice type (the types are listed in YMADeviceTypes). To disable the indicator, pass theDeviceType.nonevalue. @warning The indicator is not displayed in apps installed from the AppStore, regardless of thedeviceTypeparameter value.Declaration
Swift
@objc(enableVisibilityErrorIndicatorForDeviceType:) public static func enableVisibilityErrorIndicator(for deviceType: DeviceType)Parameters
deviceTypeThe type of a device for displaying the incorrect integration indicator.
-
Set a value indicating whether user from GDPR region allowed to collect personal data which is used for analytics and ad targeting. If the value is set to
NOpersonal data will not be collected. The default value isNO.Declaration
Swift
public static func setUserConsent(_ consent: Bool)Parameters
consentYESif user provided consent to collect personal data, otherwiseNO. -
Initializes the Yandex Mobile Ads SDK internal state.
Declaration
Swift
public static func initializeSDK(completionHandler: (() -> Void)? = nil)Parameters
completionHandlerThe block that will be executed after sdk initialization.
-
Launches SDK debug panel.
Declaration
Swift
public static func showDebugPanel() -
Set a value indicating whether anonymous AppMetrica reports are enabled. If the value is set to
falseanonymous reports will not be sent. The default value istrue.Declaration
Swift
public static func setAppAdAnalyticsReportingEnabled(_ enabled: Bool = true)Parameters
enabledfalseif you want to disable anonymous AppMetrica reports, otherwisetrue. -
Undocumented
Declaration
Swift
public static let consentManagementPlatform: ConsentManagementPlatform