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
  • Get contact list
  • Add user as a contact
  • Remove contact
  • (Deprecated) Get contact list
  • (Deprecated) Add user as a contact
  • (Deprecated) Remove contact
  1. SDK Documentation
  2. iOS client SDK

Contact

iOS Contact APIS

Get contact list

- (MXHTTPOperation*)getContactsListWithUserId:(NSString *)userId
                                      success:(void (^)(MXContactsListResponse *contactsListResponse))success
                                      failure:(void (^)(NSError *error))failure;

Input Parameters:

Name
Type
Description
Required

user_id

NSString

user id string

true

Output Parameters

MXContactsListResponse

Add user as a contact

- (MXHTTPOperation*)addToFavoritesWithUserId:(NSString *)userId
                                   contactId:(NSString *)contactId
                                        tags:(NSArray*)tags
                                     isRoom:(BOOL)isRoom
                                     success:(void (^)(void))success
                                     failure:(void (^)(NSError *error))failure;

Input Parameters:

Name
Type
Description
Required

userId

NSString

user id string

true

contactId

NSString

contact id string

true

tags

NSArray

tags NSArray

false

isRoom

bool

whether is a direct message

true

Remove contact

- (MXHTTPOperation*)deleteFavoritesWithUserId:(NSString *)userId
                                   contactId:(NSString *)contactId
                                     isRoom:(BOOL)isRoom
                                     success:(void (^)(void))success
                                      failure:(void (^)(NSError *error))failure;

Input Parameters:

Name
Type
Description
Required

userId

NSString

user id string

true

contactId

NSString

contact id string

True

isRoom

BOOL

whether is a direct message

True

Output Parameters:

Name
Type
Description
Required

success

block

A block object called when the operation succeeds

true

failure

block

A block object called when the operation fails.

true


The methods below are deprecated. Please avoid using them.

(Deprecated) Get contact list

client?.getContactsList(withUserId: user_id, success: { <#MXContactsListResponse?#> in }, failure: <#T##((Error?) -> Void)!##((Error?) -> Void)!##(Error?) -> Void#>)

Parameters:

Name
Type
Description
Required

user_id

string

user id string

true

Returns

MXContactsListResponse

(Deprecated) Add user as a contact

client?.addToFavorites(withUserId: user_id, contactId: contactId, isRoom: true, success: {}, failure: { error in })

Parameters:

Name
Type
Description
Required

user_id

string

user id string

true

contactId

string

contact id string

true

isRoom

bool

whether is a direct message

true

(Deprecated) Remove contact

client?.deleteFavorites(withUserId: user_id, contactId: contactId, isRoom: true, success: {}, failure: { error in })

Parameters:

Name
Type
Description
Required

user_id

string

user id string

true

contactId

string

contact id string

True

isRoom

bool

whether is a direct message

True

PreviousRoomNextAndroid client SDK

Last updated 1 year ago