I have a quick question about swift syntax to implement products info in analytics.
In this document: Product variable - Adobe Experience Platform Mobile SDKs
We only have info about Obective-C implementation.
Can anyone help me on the syntax for Swift? Can the documentation be uptated?
The sample code above is when using Product variable with Merchandising Variable.
The link Arjun provided above shows documentation for a Product variable only.
I get a compile error with
var contextData: [AnyHashable : Any] = [:]
Cannot convert value of type '[AnyHashable : Any]' to expected argument type '[String : String]?'
I change to
var contextData: [String : String] = [:]
Compiled successfully and received the correct information in the hit sent to Analytics.
Can you confirm that is the correct method?