Swift
Copied to your clipboard// TODO - Assignment 3var xdmData : [String: Any] = [:]// 1. Add Email to the IdentityMap.// Note: this app does not implement a logging system, so authenticatedState ambiguous is used// in this case. The other authenticatedState values are: authenticated, loggedOutxdmData["identityMap"] = ["Email": [["id": reviewerEmail,"authenticatedState": "ambiguous"]]]// 2. Add product review details in the custom field group// Note: use your _tenantId here as specified in the Product Reviews Schema in Adobe Experience PlatformxdmData["_tenantId"] = ["productSku": products[productIndex].sku,"rating": reviewRating,"reviewText": reviewText,"reviewerId": reviewerEmail]