diff --git a/PrebidMobile/ConfigurationAndTargeting/AgeUtils.swift b/PrebidMobile/ConfigurationAndTargeting/AgeUtils.swift index 091a260f9..ace561f9f 100644 --- a/PrebidMobile/ConfigurationAndTargeting/AgeUtils.swift +++ b/PrebidMobile/ConfigurationAndTargeting/AgeUtils.swift @@ -18,7 +18,8 @@ import Foundation @objc(PBMAgeUtils) @objcMembers public class AgeUtils: NSObject { - static func isYOBValid(_ yob: Int) -> Bool { + @available(*, deprecated, message: "Deprecated by ORTB") + static func isYOBValid(_ yob: Int) -> Bool { let date = Date() let calendar = Calendar.current diff --git a/PrebidMobile/ConfigurationAndTargeting/Gender.swift b/PrebidMobile/ConfigurationAndTargeting/Gender.swift index e9617b729..a7d142e00 100644 --- a/PrebidMobile/ConfigurationAndTargeting/Gender.swift +++ b/PrebidMobile/ConfigurationAndTargeting/Gender.swift @@ -44,6 +44,7 @@ enum GenderDescription : String { case other = "O" } +@available(*, deprecated, message: "Deprecated by ORTB") func GenderFromDescription(_ genderDescription: String) -> Gender { guard let knownGender = GenderDescription(rawValue: genderDescription) else { return .unknown @@ -56,6 +57,7 @@ func GenderFromDescription(_ genderDescription: String) -> Gender { } } +@available(*, deprecated, message: "Deprecated by ORTB") func DescriptionOfGender(_ gender: Gender) -> String? { switch gender { case .unknown: return nil diff --git a/PrebidMobile/ConfigurationAndTargeting/Targeting.swift b/PrebidMobile/ConfigurationAndTargeting/Targeting.swift index 103c834ae..e0be30c69 100644 --- a/PrebidMobile/ConfigurationAndTargeting/Targeting.swift +++ b/PrebidMobile/ConfigurationAndTargeting/Targeting.swift @@ -46,13 +46,19 @@ public class Targeting: NSObject { // MARK: - User Information - /// Indicates user birth year. + /** + Indicates user birth year. + */ + @available(*, deprecated, message: "Deprecated by ORTB") public var yearOfBirth: Int { get { yearofbirth } set { setYearOfBirth(yob: newValue) } } - /// This method set the year of birth value + /** + * This method set the year of birth value + */ + @available(*, deprecated, message: "Deprecated by ORTB") public func setYearOfBirth(yob: Int) { if AgeUtils.isYOBValid(yob) { yearofbirth = yob @@ -61,7 +67,8 @@ public class Targeting: NSObject { } } - /// Objective C API + // Objective C API + @available(*, deprecated, message: "Deprecated by ORTB") public func getYearOfBirth() -> NSNumber { NSNumber(value: yearOfBirth) } @@ -71,7 +78,10 @@ public class Targeting: NSObject { yearofbirth = 0 } - /// Indicates the end-user's gender. + /** + Indicates the end-user's gender. + */ + @available(*, deprecated, message: "Deprecated by ORTB") public var userGender: Gender { get { guard let currentValue = parameterDictionary[PrebidTargetingKey_GENDER] else {