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
7d19bb67
Commit
7d19bb67
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Add XXMessengerClient quick start documentation
parent
ada8d82a
No related branches found
No related tags found
2 merge requests
!102
Release 1.0.0
,
!33
XXMessengerClient
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Docs/XXMessengerClient.md
+60
-0
60 additions, 0 deletions
Docs/XXMessengerClient.md
README.md
+2
-0
2 additions, 0 deletions
README.md
with
62 additions
and
0 deletions
Docs/XXMessengerClient.md
0 → 100644
+
60
−
0
View file @
7d19bb67
# XXMessengerClient
`XXMessengerClient`
is a client wrapper library for use in xx-messenger application.
## 🛠 Instantiate messenger
Example:
```
swift
// setup environment:
var
environment
:
MessengerEnvironment
=
.
live
()
// change cMix NDF environment if needed:
environment
.
ndfEnvironment
=
...
// use alternative user-discovery if needed:
environment
.
udAddress
=
...
environment
.
udCert
=
...
environment
.
udContact
=
...
// instantiate messenger:
let
messenger
:
Messenger
=
.
live
(
environment
)
```
## 🚀 Start messenger
Example:
```
func start(messenger: Messenger) throws {
// check if messenger is loaded:
if messenger.isLoaded() == false {
// check if messenger is created and stored on disk:
if messenger.isCreated() == false {
// create new messenger and store it on disk:
try messenger.create()
}
// load messenger stored on disk:
try messenger.load()
}
// check if messenger is connected:
if messenger.isConnected() == false {
// start end-to-end connection:
try messenger.connect()
}
// check if messenger is logged in with user-discovery:
if messenger.isLoggedIn() == false {
// check if messenger is registered with user-discovery:
if try messenger.isRegistered() == false {
// register new user with user-discovery:
try messenger.register(username: "new-username")
} else {
// login previously registered user with user-discovery:
try messenger.logIn()
}
}
}
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
+
2
−
0
View file @
7d19bb67
...
...
@@ -13,6 +13,8 @@ Also you can checkout included example iOS application.
You can find full documentation with step by step guide
[
here
](
https://xxdk-dev.xx.network/mobile%20docs/ios-sdk
)
-
[
XXMessengerClient
](
Docs/XXMessengerClient.md
)
## 🚀 Quick Start
Add
`XXClient`
library as a dependency to your project using Swift Package Manager.
...
...
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