AdTargeting
@objc(YMAAdTargeting)
@objcMembers
public final class AdTargeting : NSObject, Sendable
A class with data for targeting.
-
User age.
Declaration
Swift
public let age: NSNumber? -
The gender of the user. For a list of values, see the Gender section.
Declaration
Swift
public let gender: Gender? -
User location.
Declaration
Swift
public let location: CLLocation? -
The search query that the user entered in the app.
Declaration
Swift
public let contextQuery: String? -
List of tags. Matches the context in which the ad will be displayed.
Declaration
Swift
public let contextTags: [String]? -
Creates targeting data.
Declaration
Swift
public init( age: NSNumber? = nil, gender: Gender? = nil, location: CLLocation? = nil, contextQuery: String? = nil, contextTags: [String]? = nil )Parameters
ageUser age. Default is
nil.genderThe gender of the user. Default is
nil.locationUser location. Default is
nil.contextQueryThe search query that the user entered in the app. Default is
nil.contextTagsList of tags. Matches the context in which the ad will be displayed. Default is
nil.