Manos Chorianopoulos

add firebase, ccms, gifts events

......@@ -8,7 +8,7 @@
import UIKit
import RSBarcodes_Swift
import AVFoundation
import SwiftEventBus
// import SwiftEventBus
@objc class CouponBarcodeViewController: UIViewController {
@IBOutlet weak var backgroundImage: UIImageView!
......@@ -147,7 +147,7 @@ import SwiftEventBus
@IBAction func redeemButtomAction(_ sender: Any) {
// TODO: Add redeem action
SwiftEventBus.post("couponBarcodeRedeem", sender: coupon)
// SwiftEventBus.post("couponBarcodeRedeem", sender: coupon)
let alert = UIAlertController(title: "Το κουπόνι σου ενεργοποιήθηκε", message: "Μπορείς να το βρεις στην αρχική οθόνη της εφαρμογής και στην ενότητα ενεργά δώρα!", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
......
......@@ -6,7 +6,7 @@
//
import UIKit
import SwiftEventBus
// import SwiftEventBus
@objc class CouponViewController: UIViewController {
@IBOutlet weak var mainView: UIView!
......
......@@ -83,7 +83,22 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row])
// SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row])
// firebase event
let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel()
firebaseEvent._eventName = "abc"
firebaseEvent.setParameter = ("1", "asd")
SwiftEventBus.post("firebase", sender: firebaseEvent)
// ccms event
let ccms = swiftApi.LoyaltyContextualOfferModel()
SwiftEventBus.post("ccms", sender: ccms)
// gifts event
let gift = swiftApi.LoyaltyGiftsForYouOfferClickEvent()
gift._title = "testTitle"
SwiftEventBus.post("gifts", sender: gift)
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController
......