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-06-21 14:00:52 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5dcc65dbd0061c59717dcdcf038305e182b72583
5dcc65db
1 parent
67f65e75
constructCampaignUrlForShare functionality
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
5dcc65d
...
...
@@ -1289,20 +1289,27 @@ public class swiftApi {
return
""
}
public
func
constructCampaignUrlForShare
(
_
campaign
:
CampaignItemModel
,
_
deeplink
:
String
)
->
String
{
public
func
constructCampaignUrlForShare
(
_
sessionUuid
:
String
,
_
sharingId
:
String
)
->
String
{
for
item
in
GlobalVariables
.
campaigns
{
if
(
item
.
session_uuid
==
sessionUuid
)
{
let
instanceOfMyApi
=
MyApi
()
let
campaignInfo
=
instanceOfMyApi
.
provideInfoForCampaign
()
let
finalUrl
=
(
campaign
.
index_url
??
""
)
let
finalUrl
=
(
item
.
index_url
??
""
)
+
"?web_id="
+
(
campaignInfo
?[
"web_id"
]
as!
String
)
+
"&app_uuid="
+
(
campaignInfo
?[
"app_uuid"
]
as!
String
)
+
"&api_key="
+
(
campaignInfo
?[
"api_key"
]
as!
String
)
+
"&session_uuid="
+
(
campaign
.
session_uuid
??
""
)
+
"&session_uuid="
+
(
item
.
session_uuid
??
""
)
+
"&access_token="
+
(
campaignInfo
?[
"access_token"
]
as!
String
)
+
"&refresh_token="
+
(
campaignInfo
?[
"refresh_token"
]
as!
String
)
+
"&client_id="
+
(
campaignInfo
?[
"client_id"
]
as!
String
)
+
"&client_secret="
+
(
campaignInfo
?[
"client_secret"
]
as!
String
);
+
"&client_secret="
+
(
campaignInfo
?[
"client_secret"
]
as!
String
)
+
"&sharing_id="
+
sharingId
;
return
finalUrl
break
;
}
}
return
""
}
...
...
Please
register
or
login
to post a comment