Aller au contenu

RewardRequest

Ce contenu n’est pas encore disponible dans votre langue.

struct RewardRequest

What to look a reward up for.

One value rather than a parameter list so the two SDKs read the same on the hottest path: Android has to group these (a Kotlin default argument is a binary break), and a request that grows a field grows it in one place on both.

Conforms to Swift.Equatable, Swift.Hashable, Swift.Sendable

Defined in: Sources/FrakSDK/Rewards/RewardRequest.swift:6

init(targetInteraction:audience:products:)

Section titled “init(targetInteraction:audience:products:)”
init(
targetInteraction: String? = nil,
audience: RewardAudience? = nil,
products: [ProductDetails] = []
)
var audience: RewardAudience?

Referrer or referee. nil ranks both.

var products: [ProductDetails]

Products currently in view, when known. Advisory: a campaign scoped to none of them is ranked below one matching at least one.

var targetInteraction: String?

Which interaction the reward is for, e.g. purchase. Free-form; a typo silently never matches.

!=(::)

static func != (lhs: Self, rhs: Self) -> Bool

Returns a Boolean value indicating whether two values are not equal.

Inequality is the inverse of equality. For any values a and b, a != b implies that a == b is false.

This is the default implementation of the not-equal-to operator (!=) for any type that conforms to Equatable.

  • Parameters:
    • lhs: A value to compare.
    • rhs: Another value to compare.