Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Merge requests
!18
Update Bindings
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update Bindings
feature/update-bindings
into
development
Overview
3
Commits
164
Pipelines
0
Changes
5
Merged
Dariusz Rybicki
requested to merge
feature/update-bindings
into
development
2 years ago
Overview
3
Commits
164
Pipelines
0
Changes
5
Expand
Update Bindings.xcframework (release
https://git.xx.network/elixxir/client/-/pipelines/125767
)
Update Bindings.xcframework (release
https://git.xx.network/elixxir/client/-/pipelines/132481
)
Update Bindings.xcframework (release
https://git.xx.network/elixxir/client/-/pipelines/133113
)
Update Bindings.xcframework (release
https://git.xx.network/elixxir/client/-/pipelines/133582
)
Update Bindings.xcframework (release
https://git.xx.network/elixxir/client/-/pipelines/133688
)
Use models instead of raw data whenever possible
User Discovery
Backup
File Transfers
Channels
Edited
2 years ago
by
Dariusz Rybicki
0
0
Merge request reports
Viewing commit
58da4504
Show latest version
5 files
+
80
−
50
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
58da4504
Add client error callback handler
· 58da4504
Dariusz Rybicki
authored
2 years ago
Sources/ElixxirDAppsSDK/Legacy/ClientErrorListener.swift deleted
100644 → 0
+
0
−
48
Options
import
Bindings
public
struct
ClientErrorListener
{
public
var
listen
:
(
@escaping
(
ClientError
)
->
Void
)
->
Void
public
func
callAsFunction
(
callback
:
@escaping
(
ClientError
)
->
Void
)
{
listen
(
callback
)
}
}
extension
ClientErrorListener
{
public
static
func
live
(
bindingsClient
:
BindingsCmix
)
->
ClientErrorListener
{
ClientErrorListener
{
callback
in
let
listener
=
Listener
(
onReport
:
callback
)
bindingsClient
.
registerClientErrorCallback
(
listener
)
}
}
}
private
final
class
Listener
:
NSObject
,
BindingsClientErrorProtocol
{
init
(
onReport
:
@escaping
(
ClientError
)
->
Void
)
{
self
.
onReport
=
onReport
super
.
init
()
}
let
onReport
:
(
ClientError
)
->
Void
func
report
(
_
source
:
String
?,
message
:
String
?,
trace
:
String
?)
{
guard
let
source
=
source
else
{
fatalError
(
"BindingsClientError.source is `nil`"
)
}
guard
let
message
=
message
else
{
fatalError
(
"BindingsClientError.message is `nil`"
)
}
guard
let
trace
=
trace
else
{
fatalError
(
"BindingsClientError.trace is `nil`"
)
}
onReport
(
ClientError
(
source
:
source
,
message
:
message
,
trace
:
trace
))
}
}
#if DEBUG
extension
ClientErrorListener
{
public
static
let
failing
=
ClientErrorListener
{
_
in
fatalError
(
"Not implemented"
)
}
}
#endif
Loading