YMANativeAdRequestConfiguration
Objective-C
@interface YMANativeAdRequestConfiguration
: NSObject <NSCopying, NSMutableCopying>
Swift
class YMANativeAdRequestConfiguration : NSObject, NSCopying, NSMutableCopying
This class contains native ad loader configuration parameters.
- Properties
- adUnitID
- age
- contextQuery
- contextTags
- gender
- location
- adTheme
- biddingData
- parameters
- shouldLoadImagesAutomatically
- Methods
- -initWithAdUnitID:
AdUnit ID is a unique identifier that is issued in the Partner interface and has the format R-M-XXXXXX-Y.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull adUnitID;
Swift
var adUnitID: String { get }
User age.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) NSNumber *age;
Swift
var age: NSNumber? { get }
The search query that the user entered in the app.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *contextQuery;
Swift
var contextQuery: String? { get }
An array of tags. Matches the context in which the ad will be displayed.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *contextTags;
Swift
var contextTags: [String]? { get }
The gender of the user. See the list of values in Constants.html.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *gender;
Swift
var gender: String? { get }
User location.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) CLLocation *location;
Swift
@NSCopying var location: CLLocation? { get }
Preferred ad theme.
Declaration
Objective-C
@property (nonatomic, readonly) YMAAdTheme adTheme;
Swift
var adTheme: YMAAdTheme { get }
Bidding data for loading ads from mediation.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *biddingData;
Swift
var biddingData: String? { get }
A set of arbitrary input parameters.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSDictionary<NSString *, NSString *> *parameters;
Swift
var parameters: [String : String]? { get }
Flag for automatic image loading. Acceptable values: YES
– Load automatically. NO
– Load manually.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL shouldLoadImagesAutomatically;
Swift
var shouldLoadImagesAutomatically: Bool { get }
Initializes a new object of the YMANativeAdRequestConfiguration
class (configuration for loading native ads).
Declaration
Objective-C
- (nonnull instancetype)initWithAdUnitID:(nonnull NSString *)adUnitID;
Swift
init(adUnitID: String)
Parameters
adUnitID | AdUnit ID is a unique identifier that is issued in the Partner interface and has the format R-M-XXXXXX-Y. |
adUnitID | AdUnit ID is a unique identifier that is issued in the Partner interface and has the format R-M-XXXXXX-Y. |
Return Value
An object of the YMANativeAdRequestConfiguration
class, which defines the configuration for loading native ads.