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
Commits
1697f998
Commit
1697f998
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add LogWriter
parent
87acdfc7
No related branches found
No related tags found
2 merge requests
!102
Release 1.0.0
,
!18
Update Bindings
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/ElixxirDAppsSDK/LogWriter.swift
+37
-0
37 additions, 0 deletions
Sources/ElixxirDAppsSDK/LogWriter.swift
with
37 additions
and
0 deletions
Sources/ElixxirDAppsSDK/LogWriter.swift
0 → 100644
+
37
−
0
View file @
1697f998
import
Bindings
import
XCTestDynamicOverlay
public
struct
LogWriter
{
public
init
(
handle
:
@escaping
(
String
)
->
Void
)
{
self
.
handle
=
handle
}
public
var
handle
:
(
String
)
->
Void
}
extension
LogWriter
{
public
static
let
unimplemented
=
LogWriter
(
handle
:
XCTUnimplemented
(
"
\(
Self
.
self
)
"
)
)
}
extension
LogWriter
{
func
makeBindingsLogWriter
()
->
BindingsLogWriterProtocol
{
class
Writer
:
NSObject
,
BindingsLogWriterProtocol
{
init
(
_
writer
:
LogWriter
)
{
self
.
writer
=
writer
}
let
writer
:
LogWriter
func
log
(
_
p0
:
String
?)
{
guard
let
p0
=
p0
else
{
fatalError
(
"BindingsLogWriter.log received `nil`"
)
}
writer
.
handle
(
p0
)
}
}
return
Writer
(
self
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment