Manos Chorianopoulos

add open UnifiedCouponsVC action at webview

...@@ -801,6 +801,18 @@ var timer2: DispatchSourceTimer? ...@@ -801,6 +801,18 @@ var timer2: DispatchSourceTimer?
801 dynatraceEvent._parameters = nil 801 dynatraceEvent._parameters = nil
802 SwiftEventBus.post("dynatrace", sender: dynatraceEvent) 802 SwiftEventBus.post("dynatrace", sender: dynatraceEvent)
803 803
804 + } else if (eventArray[1] == "activeCoupons") {
805 + // event:activeCoupons
806 + swiftApi().getUnifiedCouponsDeals { unifiedCoupons in
807 + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
808 + let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
809 + self.navigationController?.pushViewController(vc, animated: true)
810 + } failureCallback: { errorCode in
811 + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
812 + let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
813 + self.navigationController?.pushViewController(vc, animated: true)
814 + }
815 +
804 } 816 }
805 817
806 } 818 }
......