Showing
8 changed files
with
46 additions
and
16 deletions
No preview for this file type
... | @@ -10,6 +10,7 @@ | ... | @@ -10,6 +10,7 @@ |
10 | 1E2966EA2837A21D00F83FAC /* RSBarcodes_Swift in Frameworks */ = {isa = PBXBuildFile; productRef = 1E2966E92837A21D00F83FAC /* RSBarcodes_Swift */; }; | 10 | 1E2966EA2837A21D00F83FAC /* RSBarcodes_Swift in Frameworks */ = {isa = PBXBuildFile; productRef = 1E2966E92837A21D00F83FAC /* RSBarcodes_Swift */; }; |
11 | 1E74838D28378AF40042A589 /* CouponBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */; }; | 11 | 1E74838D28378AF40042A589 /* CouponBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E74838C28378AF40042A589 /* CouponBarcodeViewController.swift */; }; |
12 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */; }; | 12 | 1EA1AF0A2835346A008998AA /* CouponsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA1AF092835346A008998AA /* CouponsTableViewCell.swift */; }; |
13 | + 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */ = {isa = PBXBuildFile; productRef = 1EBF5F062840E13F00B8B17F /* SwiftEventBus */; }; | ||
13 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; }; | 14 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D5F56DD4E5371A50AD2D87 /* Pods_SwiftWarplyFramework.framework */; }; |
14 | E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; }; | 15 | E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; }; |
15 | E6A77854282933340045BBA8 /* SwiftWarplyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = E6A77851282933340045BBA8 /* SwiftWarplyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; | 16 | E6A77854282933340045BBA8 /* SwiftWarplyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = E6A77851282933340045BBA8 /* SwiftWarplyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
... | @@ -281,6 +282,7 @@ | ... | @@ -281,6 +282,7 @@ |
281 | files = ( | 282 | files = ( |
282 | 1E2966EA2837A21D00F83FAC /* RSBarcodes_Swift in Frameworks */, | 283 | 1E2966EA2837A21D00F83FAC /* RSBarcodes_Swift in Frameworks */, |
283 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */, | 284 | 7630AD9A6242D60846D6750C /* Pods_SwiftWarplyFramework.framework in Frameworks */, |
285 | + 1EBF5F072840E13F00B8B17F /* SwiftEventBus in Frameworks */, | ||
284 | ); | 286 | ); |
285 | runOnlyForDeploymentPostprocessing = 0; | 287 | runOnlyForDeploymentPostprocessing = 0; |
286 | }; | 288 | }; |
... | @@ -645,6 +647,7 @@ | ... | @@ -645,6 +647,7 @@ |
645 | name = SwiftWarplyFramework; | 647 | name = SwiftWarplyFramework; |
646 | packageProductDependencies = ( | 648 | packageProductDependencies = ( |
647 | 1E2966E92837A21D00F83FAC /* RSBarcodes_Swift */, | 649 | 1E2966E92837A21D00F83FAC /* RSBarcodes_Swift */, |
650 | + 1EBF5F062840E13F00B8B17F /* SwiftEventBus */, | ||
648 | ); | 651 | ); |
649 | productName = SwiftWarplyFramework; | 652 | productName = SwiftWarplyFramework; |
650 | productReference = E6A7784E282933340045BBA8 /* SwiftWarplyFramework.framework */; | 653 | productReference = E6A7784E282933340045BBA8 /* SwiftWarplyFramework.framework */; |
... | @@ -676,6 +679,7 @@ | ... | @@ -676,6 +679,7 @@ |
676 | mainGroup = E6A77844282933340045BBA8; | 679 | mainGroup = E6A77844282933340045BBA8; |
677 | packageReferences = ( | 680 | packageReferences = ( |
678 | 1E2966E82837A21D00F83FAC /* XCRemoteSwiftPackageReference "RSBarcodes_Swift" */, | 681 | 1E2966E82837A21D00F83FAC /* XCRemoteSwiftPackageReference "RSBarcodes_Swift" */, |
682 | + 1EBF5F052840E13F00B8B17F /* XCRemoteSwiftPackageReference "SwiftEventBus" */, | ||
679 | ); | 683 | ); |
680 | productRefGroup = E6A7784F282933340045BBA8 /* Products */; | 684 | productRefGroup = E6A7784F282933340045BBA8 /* Products */; |
681 | projectDirPath = ""; | 685 | projectDirPath = ""; |
... | @@ -1029,6 +1033,14 @@ | ... | @@ -1029,6 +1033,14 @@ |
1029 | minimumVersion = 5.0.0; | 1033 | minimumVersion = 5.0.0; |
1030 | }; | 1034 | }; |
1031 | }; | 1035 | }; |
1036 | + 1EBF5F052840E13F00B8B17F /* XCRemoteSwiftPackageReference "SwiftEventBus" */ = { | ||
1037 | + isa = XCRemoteSwiftPackageReference; | ||
1038 | + repositoryURL = "https://github.com/cesarferreira/SwiftEventBus"; | ||
1039 | + requirement = { | ||
1040 | + kind = upToNextMajorVersion; | ||
1041 | + minimumVersion = 5.0.0; | ||
1042 | + }; | ||
1043 | + }; | ||
1032 | /* End XCRemoteSwiftPackageReference section */ | 1044 | /* End XCRemoteSwiftPackageReference section */ |
1033 | 1045 | ||
1034 | /* Begin XCSwiftPackageProductDependency section */ | 1046 | /* Begin XCSwiftPackageProductDependency section */ |
... | @@ -1037,6 +1049,11 @@ | ... | @@ -1037,6 +1049,11 @@ |
1037 | package = 1E2966E82837A21D00F83FAC /* XCRemoteSwiftPackageReference "RSBarcodes_Swift" */; | 1049 | package = 1E2966E82837A21D00F83FAC /* XCRemoteSwiftPackageReference "RSBarcodes_Swift" */; |
1038 | productName = RSBarcodes_Swift; | 1050 | productName = RSBarcodes_Swift; |
1039 | }; | 1051 | }; |
1052 | + 1EBF5F062840E13F00B8B17F /* SwiftEventBus */ = { | ||
1053 | + isa = XCSwiftPackageProductDependency; | ||
1054 | + package = 1EBF5F052840E13F00B8B17F /* XCRemoteSwiftPackageReference "SwiftEventBus" */; | ||
1055 | + productName = SwiftEventBus; | ||
1056 | + }; | ||
1040 | /* End XCSwiftPackageProductDependency section */ | 1057 | /* End XCSwiftPackageProductDependency section */ |
1041 | }; | 1058 | }; |
1042 | rootObject = E6A77845282933340045BBA8 /* Project object */; | 1059 | rootObject = E6A77845282933340045BBA8 /* Project object */; | ... | ... |
1 | { | 1 | { |
2 | - "object": { | 2 | + "pins" : [ |
3 | - "pins": [ | 3 | + { |
4 | - { | 4 | + "identity" : "rsbarcodes_swift", |
5 | - "package": "RSBarcodes_Swift", | 5 | + "kind" : "remoteSourceControl", |
6 | - "repositoryURL": "https://github.com/yeahdongcn/RSBarcodes_Swift", | 6 | + "location" : "https://github.com/yeahdongcn/RSBarcodes_Swift", |
7 | - "state": { | 7 | + "state" : { |
8 | - "branch": null, | 8 | + "revision" : "86d8b1a1439e7edb19793d17732b15fd784a0a15", |
9 | - "revision": "86d8b1a1439e7edb19793d17732b15fd784a0a15", | 9 | + "version" : "5.1.1" |
10 | - "version": "5.1.1" | ||
11 | - } | ||
12 | } | 10 | } |
13 | - ] | 11 | + }, |
14 | - }, | 12 | + { |
15 | - "version": 1 | 13 | + "identity" : "swifteventbus", |
14 | + "kind" : "remoteSourceControl", | ||
15 | + "location" : "https://github.com/cesarferreira/SwiftEventBus", | ||
16 | + "state" : { | ||
17 | + "revision" : "a30ff35e616f507d8a8d122dac32a2150371a87e", | ||
18 | + "version" : "5.1.0" | ||
19 | + } | ||
20 | + } | ||
21 | + ], | ||
22 | + "version" : 2 | ||
16 | } | 23 | } | ... | ... |
No preview for this file type
... | @@ -6,9 +6,9 @@ | ... | @@ -6,9 +6,9 @@ |
6 | // | 6 | // |
7 | 7 | ||
8 | import UIKit | 8 | import UIKit |
9 | -//import WarplySDKFrameworkIOS | ||
10 | import RSBarcodes_Swift | 9 | import RSBarcodes_Swift |
11 | import AVFoundation | 10 | import AVFoundation |
11 | +import SwiftEventBus | ||
12 | 12 | ||
13 | @objc class CouponBarcodeViewController: UIViewController { | 13 | @objc class CouponBarcodeViewController: UIViewController { |
14 | @IBOutlet weak var backgroundImage: UIImageView! | 14 | @IBOutlet weak var backgroundImage: UIImageView! |
... | @@ -146,6 +146,8 @@ import AVFoundation | ... | @@ -146,6 +146,8 @@ import AVFoundation |
146 | 146 | ||
147 | @IBAction func redeemButtomAction(_ sender: Any) { | 147 | @IBAction func redeemButtomAction(_ sender: Any) { |
148 | // TODO: Add redeem action | 148 | // TODO: Add redeem action |
149 | + | ||
150 | + SwiftEventBus.post("couponBarcodeRedeem", sender: coupon) | ||
149 | 151 | ||
150 | let alert = UIAlertController(title: "Το κουπόνι σου ενεργοποιήθηκε", message: "Μπορείς να το βρεις στην αρχική οθόνη της εφαρμογής και στην ενότητα ενεργά δώρα!", preferredStyle: .alert) | 152 | let alert = UIAlertController(title: "Το κουπόνι σου ενεργοποιήθηκε", message: "Μπορείς να το βρεις στην αρχική οθόνη της εφαρμογής και στην ενότητα ενεργά δώρα!", preferredStyle: .alert) |
151 | alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in | 153 | alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in | ... | ... |
... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
6 | // | 6 | // |
7 | 7 | ||
8 | import UIKit | 8 | import UIKit |
9 | +import SwiftEventBus | ||
9 | 10 | ||
10 | @objc class CouponViewController: UIViewController { | 11 | @objc class CouponViewController: UIViewController { |
11 | @IBOutlet weak var mainView: UIView! | 12 | @IBOutlet weak var mainView: UIView! |
... | @@ -72,6 +73,8 @@ import UIKit | ... | @@ -72,6 +73,8 @@ import UIKit |
72 | // MARK: - Actions | 73 | // MARK: - Actions |
73 | 74 | ||
74 | @IBAction func redeemButtomAction(_ sender: Any) { | 75 | @IBAction func redeemButtomAction(_ sender: Any) { |
76 | +// SwiftEventBus.post("couponRedeem", sender: coupon) | ||
77 | + | ||
75 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 78 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
76 | let vc = storyboard.instantiateViewController(withIdentifier: "MakeItAPresentViewController") as UIViewController | 79 | let vc = storyboard.instantiateViewController(withIdentifier: "MakeItAPresentViewController") as UIViewController |
77 | self.navigationController?.pushViewController(vc, animated: true) | 80 | self.navigationController?.pushViewController(vc, animated: true) | ... | ... |
... | @@ -7,7 +7,6 @@ | ... | @@ -7,7 +7,6 @@ |
7 | 7 | ||
8 | import Foundation | 8 | import Foundation |
9 | import UIKit | 9 | import UIKit |
10 | -//import WarplySDKFrameworkIOS | ||
11 | 10 | ||
12 | @objc class CouponsTableViewCell: UITableViewCell { | 11 | @objc class CouponsTableViewCell: UITableViewCell { |
13 | @IBOutlet weak var couponBgImage: UIImageView! | 12 | @IBOutlet weak var couponBgImage: UIImageView! | ... | ... |
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | 7 | ||
8 | import Foundation | 8 | import Foundation |
9 | import UIKit | 9 | import UIKit |
10 | -//import WarplySDKFrameworkIOS | 10 | +import SwiftEventBus |
11 | 11 | ||
12 | @objc public class CouponsViewController: UIViewController { | 12 | @objc public class CouponsViewController: UIViewController { |
13 | @IBOutlet weak var backgroundImage: UIImageView! | 13 | @IBOutlet weak var backgroundImage: UIImageView! |
... | @@ -83,6 +83,8 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -83,6 +83,8 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{ |
83 | 83 | ||
84 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 84 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
85 | 85 | ||
86 | + SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row]) | ||
87 | + | ||
86 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 88 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
87 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController | 89 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController |
88 | vc.coupon = coupons[indexPath.row] | 90 | vc.coupon = coupons[indexPath.row] | ... | ... |
-
Please register or login to post a comment