RTBSDK iOS Integration
Release Notes
  • Start
    • Setup
      • Cocoapods
      • Swift Package Manager
      • Configure RTBSDK
    • Consent
  • Formats
    • Banners
    • Fullscreen (Interstitial)
    • Native Ads
    • Advanced
      • Separate Loading and Rendering of Banner Ads
  • Other
    • AdMob Custom Events
    • AppLovin Custom Adapter
    • Reference
      • Classes
        • RTBSDKManager
        • RTBBannerView
        • RTBBannerAdProvider
        • RTBBannerBid
        • RTBBannerRequestConfiguration
        • RTBBannerSize
        • RTBFullscreenAd
        • RTBFullscreenRequestConfiguration
        • RTBNativeAdLoader
        • RTBNativeAd
        • RTBNativeAdRequestConfiguration
        • RTBUserTargeting
        • RTBBidInfo
      • Protocols
        • RTBBannerViewDelegate
        • RTBBannerAdLoadDelegate
        • RTBBannerAdInteractionDelegate
        • RTBFullscreenDelegate
        • RTBNativeAdLoaderDelegate
        • RTBNativeAdInteractionDelegate
      • Enumerations
        • RTBLogLevel
        • RTBGender
  • Sample App
Powered by GitBook
On this page
  1. Other
  2. Reference
  3. Classes

RTBUserTargeting

@objc public final class RTBUserTargeting : NSObject {

    internal var userId: String?

    internal var gender: RTBGender?

    internal var yearOfBirth: NSNumber?

    internal var keywords: [String]?

    /// initialize ``RTBUserTargeting``
    /// - Parameters:
    ///   - userId: user id
    ///   - gender: user gender.
    ///     - **Important**: The default value is ``RTBGender.unknown`` and will be ignored while performing the request.
    ///   - yearOfBirth: user year of birth.
    ///     - **Important**: it has to be a 4-digit number
    ///   - keywords: targeting keywords
    @objc public init(userId: String? = nil, gender: RTBGender = .unknown, yearOfBirth: NSNumber? = nil, keywords: [String]? = nil)
}
@interface RTBUserTargeting: NSObject

@property (nonatomic, strong, nullable, readwrite) NSString *userId;
@property (nonatomic, assign, readwrite) RTBGender gender;
@property (nonatomic, strong, nullable, readwrite) NSNumber *yearOfBirth;
@property (nonatomic, strong, nullable, readwrite) NSArray<NSString *> *keywords;

/// initialize ``RTBUserTargeting``
/// - Parameters:
///   - userId: user id
///   - gender: user gender.
///     - **Important**: The default value is ``RTBGenderUnknown`` and will be ignored while performing the request.
///   - yearOfBirth: user year of birth.
///     - **Important**: it has to be a 4-digit number
///   - keywords: targeting keywords
- (instancetype)initWithUserId:(NSString *)userId
                        gender:(RTBGender)gender
                   yearOfBirth:(NSNumber *)yearOfBirth
                      keywords:(NSArray<NSString *> *)keywords;

@end

Last updated 2 months ago