Configure RTBSDK

Minimum iOS Version

RTBSDK's minimum iOS deployment version is 11.0.

Configure RTBSDK

Before loading ads, the app should pass the initial configurations first. This only needs to be done once, ideally at the app launch. You should implement this step as early as possible in order to ensure optimal ad performance.

The configuration is being done via the shared RTBSDKManager instance.

RTBSDKManager

public class RTBSDKManager : NSObject {

    internal static let shared: RTBSDKManager.RTBSDKManager

    /// A bool that indicates whether the app supports GDPR or not. Default value is **true**
    public var isGDPRApplies: Bool?

    /// A bool that indicates whether the test mode is enabled or not. Default value is **false**
    public var testModeEnabled: Bool?

    /// A ``RTBLogLevel`` that represents the SDK internal log level. Default value is ``RTBLogLevel.info``
    public var logLevel: RTBLogLevel? { get set }

    /// A bool that indicates whether the SDK should use the geo location or not. Default value is **false**
    public var useGeoLocation: Bool
    
    /// A bool that indicates whether the app is paid or not. Default value is **nil**
    public var isPaid: Bool?

    /// A bool that indicates whether the app is child-directed (supports COPPA) or not. Default value is **nil**
    public var isChildDirected: Bool?

    /// A string represents the current SDK version
    public var sdkVersion: String { get }
}

GDPR

Set isGDPRApplies to true if the app supports GDPR. Default value is true.

Test Mode

Set testModeEnabled to true to enable test mode. Default value is false.

Log Level

Sets the SDK log level. Default is RTBLogLevel.info.

Log Levels

  • Verbose

Verbose-level messages are intended to capture verbose, debug, info, warning and error messages. It’s convenient in an intensive development environment.

  • Debug

Debug-level messages are intended to capture debug, info, warning and error messages. It’s convenient in a normal development environment.

  • Info

Info-level messages are intended to capture info, warning and error messages. Info-level may be helpful but isn’t enough for troubleshooting.

  • Warn

Warn-level messages are intended to capture warning and error messages only.

  • Error

Error-level messages are intended to capture error messages only.

Use Geo Location

Set useGeoLocation to true to enable the SDK to use the geo location. Default value is false.

Set isPaid to true if the app is paid. Default value is nil.

Child Directed

Set isChildDirected to true if the app supports child-directed (COPPA) or not. Default value is nil.

SDK Version

Use this getter value to get the current SDK version

Last updated