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-07-06 13:44:04 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ab37500eebd22429ab323a063a2629f00bc27fe8
ab37500e
1 parent
c02814b7
add more campaign url logs
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
ab37500
...
...
@@ -84,10 +84,20 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
var
url
=
""
let
isCcmsOffer
=
(
campaigns
[
indexPath
.
row
]
.
ccms_offer
!=
nil
)
&&
(
campaigns
[
indexPath
.
row
]
.
ccms_offer
!=
""
)
&&
(
campaigns
[
indexPath
.
row
]
.
ccms_offer
==
"true"
)
// TODO: DELETE
print
(
"isCcmsOffer: "
+
(
isCcmsOffer
?
"true"
:
"false"
))
if
(
isCcmsOffer
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
// TODO: DELETE
print
(
"ccmsCampaigns count: "
+
String
(
ccmsCampaigns
.
count
))
let
loyaltyCampaignIdExists
=
ccmsCampaigns
.
contains
{
$0
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
}
// TODO: DELETE
print
(
"loyaltyCampaignIdExists: "
+
(
loyaltyCampaignIdExists
?
"true"
:
"false"
))
if
(
loyaltyCampaignIdExists
==
true
)
{
var
ccmsCampaignFound
:
swiftApi
.
LoyaltyContextualOfferModel
=
swiftApi
.
LoyaltyContextualOfferModel
()
for
item
in
ccmsCampaigns
{
...
...
@@ -96,8 +106,15 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
}
}
url
=
swiftApi
()
.
constructCcmsUrl
(
campaigns
[
indexPath
.
row
],
ccmsCampaignFound
)
// TODO: DELETE
print
(
"ccmsCampaignFound: "
+
ccmsCampaignFound
.
_loyaltyCampaignId
)
}
else
{
url
=
swiftApi
()
.
constructCampaignUrl
(
campaigns
[
indexPath
.
row
])
// TODO: DELETE
print
(
"loyaltyCampaignId DOESNT Exist"
)
}
}
else
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
ab37500
...
...
@@ -1537,9 +1537,13 @@ public class swiftApi {
}
public
func
constructCcmsUrl
(
_
campaign
:
LoyaltyContextualOfferModel
)
->
String
{
// TODO: DELETE
print
(
"======== constructCcmsUrl 1 arg ========"
)
for
item
in
GlobalVariables
.
campaigns
{
if
(
item
.
session_uuid
==
campaign
.
_loyaltyCampaignId
)
{
print
(
"CCMS_PRESSED"
+
" "
+
campaign
.
_id
+
" "
+
campaign
.
_offerName
)
// TODO: DELETE
print
(
"campaign matched: "
+
" "
+
item
.
session_uuid
+
" ccms matched: "
+
campaign
.
_loyaltyCampaignId
)
var
assetsString
=
""
if
(
campaign
.
_eligibleAssets
!=
nil
&&
campaign
.
_eligibleAssets
.
count
>
0
)
{
...
...
@@ -1591,10 +1595,14 @@ public class swiftApi {
}
}
print
(
"constructCcmsUrl url: "
+
""
)
// TODO: DELETE
print
(
"======== constructCcmsUrl 1 arg: ccms not matched ========"
)
return
""
}
public
func
constructCcmsUrl
(
_
campaign
:
CampaignItemModel
,
_
ccmsCampaign
:
LoyaltyContextualOfferModel
)
->
String
{
// TODO: DELETE
print
(
"======== constructCcmsUrl 2 args ========"
)
print
(
"CCMS_PRESSED"
+
" "
+
ccmsCampaign
.
_id
+
" "
+
ccmsCampaign
.
_offerName
)
var
assetsString
=
""
...
...
Please
register
or
login
to post a comment