MoEngageRecommendedItems
@objc(MoEngageRecommendedItems)
public final class MoEngageRecommendedItems : NSObject, @unchecked Sendable
Success payload for MoEngageFetchRecommendationsTask.
Carries the recommended products for the requested recommendation, ranked
best-first. An empty items array is a success, not a failure — it
means no recommendations are currently available for this user, which the
app is expected to branch on rather than treat as an error.
Each element is one product’s catalog attributes. The keys and their value
types are defined by the catalog on the MoEngage dashboard and are passed
through verbatim — hence snake_case keys such as product_id and
image_link, and values that may be strings, numbers or booleans rather
than only strings. product_id, title, image_link and link are always
returned; anything else depends on the requested includedFields.
Note
If the server returns one of these fields as JSONnull, the key is
omitted from the dictionary entirely rather than surfacing as an
explicit null value — matching AnyMoEngagePrimitiveValue.value‘s general
nil-means-absent semantics (the same rule nested dictionary values follow
elsewhere in the SDK). Check for the key’s absence, not for a null value.
-
The recommended products, ranked best-first. Empty when none are available.
Declaration
Swift
@objc public let items: [[String : any Sendable]]