SendingNetwork
  • OVERVIEW
    • Getting Started
    • FAQs
  • Network Instructional Articles
    • Basics
      • Introducing the Edge, WatchDog, and Guardian Nodes
      • Overview
      • Messaging Solution
      • Privacy Solution
      • Rich Communication Solution
      • Multi-Platform Solution
      • Decentralized Identity
      • Multiple Chat Modes
      • How It Works
      • Token Utility
      • The Team
    • Key Concepts
      • Decentralized Identity
      • Social Graphs
      • Edge Node
  • SDK Documentation
    • Glossary
    • JavaScript client SDK
      • DID
      • User
      • Message
      • Room
      • Contact
      • Social Graph
    • iOS client SDK
      • Push
      • DID
      • User
      • Message
      • Room
      • Contact
    • Android client SDK
      • User
      • Room
    • Java SDK
      • DID
      • Room
      • Message
    • Node.js SDK
      • DID
      • Room
      • Message
    • Unreal SDK
      • DID
      • User
      • Message
      • Room
    • Unity SDK
      • DID
      • Room
      • Message
    • Website chat widget SDK
      • Customization
      • DID
      • User
      • Room
      • Message
      • Other
    • Bot SDKs
      • Golang Bot SDK
        • DID
        • User
        • Room
        • Message
    • Extensible Message Interface
    • Push Notifications
    • Flutter SDK
      • DID
      • User
      • Message
      • Room
    • PHP SDK
      • DID
      • Room
      • User
    • Developer Key
  • Acquisition Kit
    • Social Boost Development Instructions
  • WatchDog Agent
    • WatchDog Agent Guide
    • WatchDog Agent Deployment Tutorial
      • Linux Deployment Tutorial
    • One-Click Deployment
  • Edge Node
    • Edge Node Deployment Tutorial
    • VPS Setup Guide
      • Google Cloud Platform (GCP)
      • Amazon Web Services (AWS)
      • Contabo
    • Check Node Stats with Auto-Reply Bot in SendingMe App
    • Alpha-3 Testnet FAQs
  • delegation node
    • Delegation Node Deployment Tutorial
  • Private Delegation Node
  • Use Cases
    • Wallet-to-Wallet Messaging
    • Dapp Notifications
    • Identity Verification
    • Gamer Acquisition
    • Cross-platform Trading
Powered by GitBook
On this page
  • Set user display name
  • Get the display name of a user
  • Set user avatar
  • Get the avatar url of a user
  • Get the profile information of a user
  • Set signature for a user
  • Get signature of a user
  • (Deprecated) Modify nickname
  • (Deprecated) Modify profile image
  • (Deprecated) Query profile information
  1. SDK Documentation
  2. iOS client SDK

User

iOS User APIs

Set user display name

- (MXHTTPOperation*)setDisplayName:(NSString*)displayname
                           success:(void (^)(void))success
                           failure:(void (^)(NSError *error))failure NS_REFINED_FOR_SWIFT;

Input Parameters::

Name
Type
Description
Required

displayname

NSString

the new display name

true

Output Parameters:

Name
Type
Description
Required

success

A block object

A block object called when the operation succeeds.

true

failure

A block object

A block object called when the operation fails.

true

Get the display name of a user

- (MXHTTPOperation*)profileForUser:(NSString*)userId
                           success:(void (^)(NSString *displayName, NSString *avatarUrl))success
                           failure:(void (^)(NSError *error))failure NS_REFINED_FOR_SWIFT;

Input Parameters::

Name
Type
Description
Required

userId

string

the user ID

True

Output Parameters:

Name
Type
Description
Required

displayName

NSString

user display name

true

avatarUrl

NSString

url of the profile image

true

Set user avatar

Set the user's profile image url. The user must have previously logged into SendingNetwork.

- (MXHTTPOperation*)setAvatarUrl:(NSString*)avatarUrl
                         success:(void (^)(void))success
                         failure:(void (^)(NSError *error))failure NS_REFINED_FOR_SWIFT;

Input Parameters::

Name
Type
Description
Required

avatarUrl

NSString

the new avatar url

True

Output Parameters:

Name
Type
Description
Required

success

A block object

A block object called when the operation succeeds

true

failure

A block object

A block object called when the operation fails

true

Get the avatar url of a user

- (MXHTTPOperation*)avatarUrlForUser:(NSString*)userId
                             success:(void (^)(NSString *avatarUrl))success
                             failure:(void (^)(NSError *error))failure NS_REFINED_FOR_SWIFT;

Input Parameters::

Name
Type
Description
Required

userId

NSString

the user ID

True

Output Parameters:

Name
Type
Description
Required

success

block

A block object called when the operation succeeds. It provides the user avatar url.

true

failure

block

A block object called when the operation fails.

true

Get the profile information of a user

- (MXHTTPOperation*)profileForUser:(NSString*)userId
                           success:(void (^)(NSString *displayName, NSString *avatarUrl))success
                           failure:(void (^)(NSError *error))failure NS_REFINED_FOR_SWIFT;

Input Parameters::

Name
Type
Description
Required

userId

NSString

the user id

True

Output Parameters:

Name
Type
Description
Required

success

NSString

A block object called when the operation succeeds. It provides the user display name and avatar url.

true

failure

NSString

A block object called when the operation fails.

true

Set signature for a user

- (MXHTTPOperation*)setSignatureWithUserId:(NSString *)userId
                                 signature:(NSString *)signature
                                   success:(void (^)(void))success
                                   failure:(void (^)(NSError *error))failure

Input Parameters::

Name
Type
Description
Required

userId

NSString

user ID

True

signature

NSString

signature, length <= 100

True

Output Parameters:

Name
Type
Description
Required

success

block

success description

true

failure

block

failure description

true

Get signature of a user

- (MXHTTPOperation*)getSignatureWithUserId:(NSString *)userId
                                   success:(void (^)(NSString * signature))success
                                   failure:(void (^)(NSError *error))failure;

Input Parameters::

Name
Type
Description
Required

userId

NSString

the user id

True

Output Parameters:

Name
Type
Description
Required

success

block

(void (^)(NSString * signature))success

true

failure

block

failure description

true


The APIs below are deprecated. Please avoid using them.

(Deprecated) Modify nickname

client?.setDisplayName(displayName, completion: { response in })

Input Parameters:

Name
Type
Description
Required

displayName

string

new nick name

true

(Deprecated) Modify profile image

client?.setAvatarUrl(URL.init(string: avatarUrl), completion: { response in })

Input Parameters:

Name
Type
Description
Required

avatarUrl

string

new profile image URL

true

(Deprecated) Query profile information

client?.profile(forUser: user_id, completion: { response in })

Input Parameters:

Name
Type
Description
Required

user_id

string

user id

true

Output Parameters:

Name
Type
Description

displayname

string

user nickname string

avatar_url

String

user profile image URL string

PreviousDIDNextMessage

Last updated 1 year ago