Manos Chorianopoulos

fix campaignUrl crash

......@@ -23,9 +23,10 @@ import SwiftEventBus
setBackButton()
webview.navigationDelegate = self
let url = URL(string: campaignUrl)!
if let url = URL(string: campaignUrl) {
webview.load(URLRequest(url: url))
webview.allowsBackForwardNavigationGestures = true
}
webview.configuration.userContentController.add(self, name: "Cosmote")
}
......
......@@ -1527,14 +1527,14 @@ public class swiftApi {
let instanceOfMyApi = MyApi()
let campaignInfo = instanceOfMyApi.provideInfoForCampaign()
let finalUrl = (item.index_url ?? "")
+ "?web_id=" + (campaignInfo?["web_id"] as! String)
+ "&app_uuid=" + (campaignInfo?["app_uuid"] as! String)
+ "&api_key=" + (campaignInfo?["api_key"] as! String)
+ "?web_id=" + (campaignInfo?["web_id"] as? String ?? "")
+ "&app_uuid=" + (campaignInfo?["app_uuid"] as? String ?? "")
+ "&api_key=" + (campaignInfo?["api_key"] as? String ?? "")
+ "&session_uuid=" + (item.session_uuid ?? "")
+ "&access_token=" + (campaignInfo?["access_token"] as! String)
+ "&refresh_token=" + (campaignInfo?["refresh_token"] as! String)
+ "&client_id=" + (campaignInfo?["client_id"] as! String)
+ "&client_secret=" + (campaignInfo?["client_secret"] as! String)
+ "&access_token=" + (campaignInfo?["access_token"] as? String ?? "")
+ "&refresh_token=" + (campaignInfo?["refresh_token"] as? String ?? "")
+ "&client_id=" + (campaignInfo?["client_id"] as? String ?? "")
+ "&client_secret=" + (campaignInfo?["client_secret"] as? String ?? "")
+ "&Session_ID=" + (campaign._sessionId)
+ "&businessService=" + (campaign._businessService)
+ "&offerName=" + (campaign._offerName)
......@@ -1569,14 +1569,14 @@ public class swiftApi {
let instanceOfMyApi = MyApi()
let campaignInfo = instanceOfMyApi.provideInfoForCampaign()
let finalUrl = (campaign.index_url ?? "")
+ "?web_id=" + (campaignInfo?["web_id"] as! String)
+ "&app_uuid=" + (campaignInfo?["app_uuid"] as! String)
+ "&api_key=" + (campaignInfo?["api_key"] as! String)
+ "?web_id=" + (campaignInfo?["web_id"] as? String ?? "")
+ "&app_uuid=" + (campaignInfo?["app_uuid"] as? String ?? "")
+ "&api_key=" + (campaignInfo?["api_key"] as? String ?? "")
+ "&session_uuid=" + (campaign.session_uuid ?? "")
+ "&access_token=" + (campaignInfo?["access_token"] as! String)
+ "&refresh_token=" + (campaignInfo?["refresh_token"] as! String)
+ "&client_id=" + (campaignInfo?["client_id"] as! String)
+ "&client_secret=" + (campaignInfo?["client_secret"] as! String)
+ "&access_token=" + (campaignInfo?["access_token"] as? String ?? "")
+ "&refresh_token=" + (campaignInfo?["refresh_token"] as? String ?? "")
+ "&client_id=" + (campaignInfo?["client_id"] as? String ?? "")
+ "&client_secret=" + (campaignInfo?["client_secret"] as? String ?? "")
+ "&Session_ID=" + (ccmsCampaign._sessionId)
+ "&businessService=" + (ccmsCampaign._businessService)
+ "&offerName=" + (ccmsCampaign._offerName)
......