Manos Chorianopoulos

fix getCampaignsPersonalizedAsync request

......@@ -833,24 +833,35 @@ public class swiftApi {
if let responseDataDictionary = campaignsData as? [String: AnyObject] {
if (responseDataDictionary["MAPP_CAMPAIGNING-status"] as? Int == 1) {
if (responseDataDictionary["status"] as? Int == 1) {
if let responseDataMapp = responseDataDictionary["MAPP_CAMPAIGNING"] as? [String: Any] {
if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] {
if let responseDataContext = responseDataDictionary["context"] as? [String: Any] {
if (responseDataContext["MAPP_CAMPAIGNING-status"] as? Int == 1) {
for item in responseDataCampaigns {
if let itemDictionary = item {
let tempCampaign = CampaignItemModel(dictionary: itemDictionary)
campaignsArray.append(tempCampaign)
if let responseDataMapp = responseDataContext["MAPP_CAMPAIGNING"] as? [String: Any] {
if let responseDataCampaigns = responseDataMapp["campaigns"] as? [[String : Any]?] {
for item in responseDataCampaigns {
if let itemDictionary = item {
let tempCampaign = CampaignItemModel(dictionary: itemDictionary)
campaignsArray.append(tempCampaign)
}
}
getCampaignsCallback(campaignsArray);
}
} else {
getCampaignsCallback(nil)
}
getCampaignsCallback(campaignsArray);
} else {
getCampaignsCallback(nil)
}
} else {
getCampaignsCallback(nil)
}
} else {
getCampaignsCallback(nil)
}
......