YMANativeAdRequestConfiguration

Objective-C

@interface YMANativeAdRequestConfiguration
    : NSObject <NSCopying, NSMutableCopying>

Swift

class YMANativeAdRequestConfiguration : NSObject, NSCopying, NSMutableCopying

This class contains native ad loader configuration parameters.

  1. Properties
  2. adUnitID
  3. age
  4. contextQuery
  5. contextTags
  6. gender
  7. location
  8. adTheme
  9. biddingData
  10. parameters
  11. shouldLoadImagesAutomatically
  12. Methods
  13. -initWithAdUnitID:

Properties

adUnitID

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 }

age

User age.

Declaration

Objective-C

@property (nonatomic, strong, readonly, nullable) NSNumber *age;

Swift

var age: NSNumber? { get }

contextQuery

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 }

contextTags

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 }

gender

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 }

location

User location.

Declaration

Objective-C

@property (nonatomic, copy, readonly, nullable) CLLocation *location;

Swift

@NSCopying var location: CLLocation? { get }

adTheme

Preferred ad theme.

Declaration

Objective-C

@property (nonatomic, readonly) YMAAdTheme adTheme;

Swift

var adTheme: YMAAdTheme { get }

biddingData

Bidding data for loading ads from mediation.

Declaration

Objective-C

@property (nonatomic, copy, readonly, nullable) NSString *biddingData;

Swift

var biddingData: String? { get }

parameters

A set of arbitrary input parameters.

Declaration

Objective-C

@property (nonatomic, copy, readonly, nullable) NSDictionary<NSString *, NSString *> *parameters;

Swift

var parameters: [String : String]? { get }

shouldLoadImagesAutomatically

Flag for automatic image loading. Acceptable values: YES – Load automatically. NO – Load manually.

Warning If the app simultaneously stores links to a large number of ads, we recommend using manual image loading.

Declaration

Objective-C

@property (nonatomic, readonly) BOOL shouldLoadImagesAutomatically;

Swift

var shouldLoadImagesAutomatically: Bool { get }

Methods

-initWithAdUnitID:

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.