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
!67
Project 'elixxir/elixxir-dapps-sdk-swift' was moved to 'mobile/ios/elixxir-dapps-sdk-swift'. Please update any links and bookmarks that may still have the old path.
Update Bindings
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update Bindings
dev/update-bindings
into
development
Overview
0
Commits
8
Pipelines
0
Changes
4
Merged
Dariusz Rybicki
requested to merge
dev/update-bindings
into
development
2 years ago
Overview
0
Commits
8
Pipelines
0
Changes
4
Expand
Update Bindings.xcframework
client@3cad439c
client@362b94ae
client@dc6a1c86
client@125128c0
client@a3ffe7a6
go version go1.17.13 darwin/arm64
Xcode 13.4.1 Build version 13F100
gomobile bind target: ios,iossimulator,macos
Edited
2 years ago
by
Dariusz Rybicki
0
0
Merge request reports
Viewing commit
83f3995e
Prev
Next
Show latest version
4 files
+
104
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
83f3995e
Merge branch 'development' into dev/update-bindings
· 83f3995e
Dariusz Rybicki
authored
2 years ago
Sources/XXMessengerClient/Messenger/Functions/MessengerRegisterForNotifications.swift
0 → 100644
+
35
−
0
Options
import
Foundation
import
XXClient
import
XCTestDynamicOverlay
public
struct
MessengerRegisterForNotifications
{
public
enum
Error
:
Swift
.
Error
,
Equatable
{
case
notConnected
}
public
var
run
:
(
Data
)
throws
->
Void
public
func
callAsFunction
(
token
:
Data
)
throws
->
Void
{
try
run
(
token
)
}
}
extension
MessengerRegisterForNotifications
{
public
static
func
live
(
_
env
:
MessengerEnvironment
)
->
MessengerRegisterForNotifications
{
MessengerRegisterForNotifications
{
token
in
guard
let
e2e
=
env
.
e2e
()
else
{
throw
Error
.
notConnected
}
try
env
.
registerForNotifications
(
e2eId
:
e2e
.
getId
(),
token
:
token
.
map
{
String
(
format
:
"%02hhx"
,
$0
)
}
.
joined
()
)
}
}
}
extension
MessengerRegisterForNotifications
{
public
static
let
unimplemented
=
MessengerRegisterForNotifications
(
run
:
XCTUnimplemented
(
"
\(
Self
.
self
)
"
)
)
}
Loading