Targeting

@objcMembers
public class Targeting : NSObject

Undocumented

  • Undocumented

    Declaration

    Swift

    public static var shared: Targeting

OMID Partner

  • Undocumented

    Declaration

    Swift

    public var omidPartnerName: String?
  • Undocumented

    Declaration

    Swift

    public var omidPartnerVersion: String?

User Information

  • Indicates user birth year.

    Declaration

    Swift

    public var yearOfBirth: Int { get set }
  • This method set the year of birth value

    Declaration

    Swift

    public func setYearOfBirth(yob: Int)
  • Undocumented

    Declaration

    Swift

    public func getYearOfBirth() -> NSNumber
  • This method clears year of birth value set by the application developer

    Declaration

    Swift

    public func clearYearOfBirth()
  • Indicates the end-user’s gender.

    Declaration

    Swift

    public var userGender: Gender { get set }
  • String representation of the users gender, where “M” = male, “F” = female, “O” = known to be other (i.e., omitted is unknown)

    Declaration

    Swift

    public func userGenderDescription() -> String?
  • Indicates the customer-provided user ID, if different from the Device ID.

    Declaration

    Swift

    public var userID: String? { get set }
  • Buyer-specific ID for the user as mapped by the exchange for the buyer.

    Declaration

    Swift

    public var buyerUID: String?
  • Optional feature to pass bidder data that was set in the exchange’s cookie. The string must be in base85 cookie safe characters and be in any format. Proper JSON encoding must be used to include “escaped” quotation marks.

    Declaration

    Swift

    public var userCustomData: String?
  • Placeholder for User Identity Links. The data from this property will be added to usr.ext.eids

    Declaration

    Swift

    public var eids: [[String : AnyHashable]]?
  • Placeholder for exchange-specific extensions to OpenRTB.

    Declaration

    Swift

    public var userExt: [String : AnyHashable]?

COPPA

  • Objective C analog of subjectToCOPPA

    Declaration

    Swift

    public var coppa: NSNumber? { get set }
  • Integer flag indicating if this request is subject to the COPPA regulations established by the USA FTC, where 0 = no, 1 = yes

    Declaration

    Swift

    public var subjectToCOPPA: Bool? { get set }

GDPR

  • The boolean value set by the user to collect user data

    Declaration

    Swift

    public var subjectToGDPR: Bool? { get set }
  • Undocumented

    Declaration

    Swift

    public func setSubjectToGDPR(_ newValue: NSNumber?)
  • Undocumented

    Declaration

    Swift

    public func getSubjectToGDPR() -> NSNumber?

GDPR Consent

  • The consent string for sending the GDPR consent

    Declaration

    Swift

    public var gdprConsentString: String? { get set }

TCFv2

External User Ids

  • Undocumented

    Declaration

    Swift

    public var externalUserIds: [ExternalUserId]
  • This method allows to save External User Id in the User Defaults

    Declaration

    Swift

    public func storeExternalUserId(_ externalUserId: ExternalUserId)
  • This method allows to get All External User Ids from User Defaults

    Declaration

    Swift

    public func fetchStoredExternalUserIds() -> [ExternalUserId]?
  • This method allows to get External User Id from User Defaults by passing respective ‘source’ string as param

    Declaration

    Swift

    public func fetchStoredExternalUserId(_ source: String) -> ExternalUserId?
  • This method allows to remove specific External User Id from User Defaults by passing respective ‘source’ string as param

    Declaration

    Swift

    public func removeStoredExternalUserId(_ source: String)
  • This method allows to remove all the External User Ids from User Defaults

    Declaration

    Swift

    public func removeStoredExternalUserIds()
  • Undocumented

    Declaration

    Swift

    public func getExternalUserIds() -> [[AnyHashable : Any]]?

Application Information

  • This is the deep-link URL for the app screen that is displaying the ad. This can be an iOS universal link.

    Declaration

    Swift

    public var contentUrl: String?
  • App’s publisher name.

    Declaration

    Swift

    public var publisherName: String?
  • ID of publisher app in Apple’s App Store.

    Declaration

    Swift

    public var sourceapp: String?
  • Undocumented

    Declaration

    Swift

    public var storeURL: String? { get set }
  • Undocumented

    Declaration

    Swift

    public var domain: String?
  • The itunes app id for targeting

    Declaration

    Swift

    public var itunesID: String?
  • The application location for targeting

    Declaration

    Swift

    public var location: CLLocation?
  • The application location precision for targeting

    Declaration

    Swift

    public var locationPrecision: Int?
  • Undocumented

    Declaration

    Swift

    public func setLocationPrecision(_ newValue: NSNumber?)
  • Undocumented

    Declaration

    Swift

    public func getLocationPrecision() -> NSNumber?

Location and connection information

  • CLLocationCoordinate2D. See CoreLocation framework documentation.

    Declaration

    Swift

    public var coordinate: NSValue?

Public Methods

  • Undocumented

    Declaration

    Swift

    public func addParam(_ value: String, withName: String?)
  • Undocumented

    Declaration

    Swift

    public func setCustomParams(_ params: [String : String]?)
  • Undocumented

    Declaration

    Swift

    public func addCustomParam(_ value: String, withName: String?)
  • Undocumented

    Declaration

    Swift

    public func setLatitude(_ latitude: Double, longitude: Double)

Access Control List (ext.prebid.data)

Global User Data (user.ext.data)

  • Undocumented

    Declaration

    Swift

    public func addUserData(key: String, value: String)
  • Undocumented

    Declaration

    Swift

    public func updateUserData(key: String, value: Set<String>)
  • Undocumented

    Declaration

    Swift

    public func removeUserData(for key: String)
  • Undocumented

    Declaration

    Swift

    public func clearUserData()
  • Undocumented

    Declaration

    Swift

    public func getUserData() -> [String : [String]]
  • Undocumented

    Declaration

    Swift

    public var userDataDictionary: [String : [String]] { get }

Global User Keywords (user.keywords)

  • Undocumented

    Declaration

    Swift

    public func addUserKeyword(_ newElement: String)
  • Undocumented

    Declaration

    Swift

    public func addUserKeywords(_ newElements: Set<String>)
  • Undocumented

    Declaration

    Swift

    public func removeUserKeyword(_ element: String)
  • Undocumented

    Declaration

    Swift

    public func clearUserKeywords()
  • Undocumented

    Declaration

    Swift

    public func getUserKeywords() -> [String]
  • Undocumented

    Declaration

    Swift

    public var userKeywords: [String] { get }

Global Data (app.ext.data)

Global Keywords (app.keywords)

  • Undocumented

    Declaration

    Swift

    public func addContextKeyword(_ newElement: String)
  • Undocumented

    Declaration

    Swift

    public func addContextKeywords(_ newElements: Set<String>)
  • Undocumented

    Declaration

    Swift

    public func removeContextKeyword(_ element: String)
  • Undocumented

    Declaration

    Swift

    public func clearContextKeywords()
  • Undocumented

    Declaration

    Swift

    public func getContextKeywords() -> [String]
  • Undocumented

    Declaration

    Swift

    public var contextKeywords: [String] { get }
  • Undocumented

    Declaration

    Swift

    public func addAppKeyword(_ newElement: String)
  • Undocumented

    Declaration

    Swift

    public func addAppKeywords(_ newElements: Set<String>)
  • Undocumented

    Declaration

    Swift

    public func removeAppKeyword(_ element: String)
  • Undocumented

    Declaration

    Swift

    public func clearAppKeywords()
  • Undocumented

    Declaration

    Swift

    public func getAppKeywords() -> [String]

Internal Properties

  • Undocumented

    Declaration

    Swift

    public var parameterDictionary: [String : String]