Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-05-27 16:11:01 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1255f73766b30ec7c5f772a2184fe2cdf2aaa09
f1255f73
1 parent
7354b9b8
add firebase, ccms, gifts events
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f1255f7
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
View file @
f1255f7
...
...
@@ -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
...
...
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
f1255f7
...
...
@@ -6,7 +6,7 @@
//
import
UIKit
import
SwiftEventBus
//
import SwiftEventBus
@objc
class
CouponViewController
:
UIViewController
{
@IBOutlet
weak
var
mainView
:
UIView
!
...
...
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
View file @
f1255f7
...
...
@@ -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
...
...
Please
register
or
login
to post a comment