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
2025-07-28 09:56:41 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ddfbac86b62629de225e9db54b57f49f73964ffa
ddfbac86
1 parent
be4503c3
getMerchants failureCallback fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Core/WarplySDK.swift
SwiftWarplyFramework/SwiftWarplyFramework/Core/WarplySDK.swift
View file @
ddfbac8
...
...
@@ -2388,7 +2388,8 @@ public final class WarplySDK {
uuid
:
String
=
""
,
distance
:
Int
=
0
,
parentUuids
:
[
String
]
=
[],
completion
:
@escaping
([
MerchantModel
]?)
->
Void
completion
:
@escaping
([
MerchantModel
]?)
->
Void
,
failureCallback
:
@escaping
(
Int
)
->
Void
)
{
// Handle language default inside the method
let
finalLanguage
=
language
??
self
.
applicationLocale
...
...
@@ -2435,7 +2436,7 @@ public final class WarplySDK {
dynatraceEvent
.
_parameters
=
nil
self
.
postFrameworkEvent
(
"dynatrace"
,
sender
:
dynatraceEvent
)
completion
(
merchantsArray
)
failureCallback
(
-
1
)
}
}
}
catch
{
...
...
@@ -2445,7 +2446,11 @@ public final class WarplySDK {
dynatraceEvent
.
_parameters
=
nil
self
.
postFrameworkEvent
(
"dynatrace"
,
sender
:
dynatraceEvent
)
completion
(
nil
)
if
let
networkError
=
error
as?
NetworkError
{
failureCallback
(
networkError
.
code
)
}
else
{
failureCallback
(
-
1
)
}
}
}
}
...
...
@@ -2461,7 +2466,8 @@ public final class WarplySDK {
uuid
:
String
=
""
,
distance
:
Int
=
0
,
parentUuids
:
[
String
]
=
[],
completion
:
@escaping
([
MerchantModel
]?)
->
Void
completion
:
@escaping
([
MerchantModel
]?)
->
Void
,
failureCallback
:
@escaping
(
Int
)
->
Void
=
{
_
in
}
)
{
// Call new method with nil language (will use applicationLocale)
getMerchants
(
...
...
@@ -2473,7 +2479,8 @@ public final class WarplySDK {
uuid
:
uuid
,
distance
:
distance
,
parentUuids
:
parentUuids
,
completion
:
completion
completion
:
completion
,
failureCallback
:
failureCallback
)
}
...
...
@@ -2612,14 +2619,18 @@ public final class WarplySDK {
tags
:
tags
,
uuid
:
uuid
,
distance
:
distance
,
parentUuids
:
parentUuids
)
{
merchants
in
if
let
merchants
=
merchants
{
continuation
.
resume
(
returning
:
merchants
)
}
else
{
continuation
.
resume
(
throwing
:
WarplyError
.
networkError
)
parentUuids
:
parentUuids
,
completion
:
{
merchants
in
if
let
merchants
=
merchants
{
continuation
.
resume
(
returning
:
merchants
)
}
else
{
continuation
.
resume
(
throwing
:
WarplyError
.
networkError
)
}
},
failureCallback
:
{
errorCode
in
continuation
.
resume
(
throwing
:
WarplyError
.
unknownError
(
errorCode
))
}
}
)
}
}
...
...
Please
register
or
login
to post a comment