MoEngageTrackDeviceLocaleResult

@objc
public final class MoEngageTrackDeviceLocaleResult : NSObject, @unchecked Sendable

Success payload for MoEngageSDKAnalytics.trackLocale(...).

trackLocale resolves onSuccess when at least one sub-attribute was accepted. If every attempted sub-attribute was skipped (e.g. data tracking is disabled, user is opted out, call from extension context), the task rejects with MoEngageCoreRequestFailureReason(moduleCode: .trackLocaleSubAttributeFailed) instead — per-attribute reasons appear in the failure message.

Shape mirrors Android’s UserAttributeResult.Bulk for cross-platform parity.

  • Sub-attribute name → value pairs that were successfully tracked. Cache hits (dedup) count as accepted per the dedup-as-success contract. Values are concrete String (locale-derived: region code, language code, identifier, etc.) — [String: String] is Sendable-safe by construction without relying on the class-level @unchecked Sendable opt-out for this field.

    Declaration

    Swift

    @objc
    public let acceptedAttributes: [String : String]
  • Sub-attribute name → human-readable reason for attributes the SDK rejected. Example: ["LOCALE_COUNTRY": "Data tracking is disabled"]. Empty when every attempted attribute was accepted.

    Declaration

    Swift

    @objc
    public let skippedAttributes: [String : String]
  • Always .project for trackLocale — locale attributes are project-level by SDK design (customer does not choose). Field retained for cross-platform parity with Android’s bulk-attribute result type.

    Declaration

    Swift

    @objc
    public let attributeLevel: MoEngageUserAttributeLevel