TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Get Contact List
  • Fetch All User Contacts from Server
  • Get Contact Detail Info with TapTalk User ID
  • Get Contact Detail Info with Client User ID
  • Add User to Contacts with User ID
  • Add User to Contacts with Phone Number
  • Remove User from Contacts
  • Save User Data
  • Search Local Contact
  • Report User
  • Report Message
  • Block User
  • Unblock User
  • Get Blocked User List
  • Get Blocked User IDs
  • Get Groups in Common

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk iOS

Contact

If your application is using the core implementation type, you can use these methods to manage your user's contacts.

Note: Please add #import <TapTalk/TapCoreContactManager.h> before using these methods.

TapTalk Contact Method

Description

Get all of the user's contact data from TapTalk.io.

Fetch the user's latest contact data from TapTalk.io server

Get a detailed contact info with selected TapTalk.io user ID.

Get a detailed contact info with selected Client user ID (xcUserID).

Add a user with selected TapTalk.io user ID to the active user's contacts.

Add a user with selected phone number to the active user's contacts.

Remove a user with selected TapTalk.io user ID from the active user's contacts.

Save or update existing user data to local cache.

Search the active user's contacts from the device's local storage with a keyword.

Submit a report for a selected user.

Submit a report for a selected message.

Block a user from sending or receiving messages.

Unblock a blocked user.

Retrieve a list of blocked users.

Retrieve a list of IDs from blocked users.

Retrieve the list of groups in common with another user.

Get Contact List

Create a new group Get all of the user's contact data from TapTalk.io.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] getAllUserContactsWithSuccess:^(NSArray<TAPUserModel *> * _Nonnull userArray) {
    // Successfully fetched contact list data
}
failure:^(NSError * _Nonnull error) {
    // Failed to get contact list data
}];

Fetch All User Contacts from Server

Calling fetchAllUserContactsFromServer will fetch the user's latest contact data from TapTalk.io server and syncs it to the device's local storage.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] fetchAllUserContactsFromServerWithSuccess:^(NSArray<TAPUserModel *> * _Nonnull userArray) {
    // Successfully fetched contact list data
}
failure:^(NSError * _Nonnull error) {
    // Failed to get contact list data
}];

Get Contact Detail Info with TapTalk User ID

Get a detailed contact info with selected TapTalk.io user ID.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] getUserDataWithUserID:USER_ID
success:^(TAPUserModel * _Nonnull user) {
    // Successfully obtained contact details
}
failure:^(NSError * _Nonnull error) {
    // Failed to get contact details
}];

Parameters USER_ID: (String) Taptalk.io User ID of the selected user

Get Contact Detail Info with Client User ID

Get a detailed contact info with selected Client user ID (xcUserID).

//import TapTalk Contact Manager
#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] getUserDataWithXCUserID:XC_USER_ID
success:^(TAPUserModel * _Nonnull user) {
    // Successfully obtained contact details
}
failure:^(NSError * _Nonnull error) {
    // Failed to get contact details
}];

Parameters XC_USER_ID: (String) Client User ID of the selected user

Add User to Contacts with User ID

Add a user with selected TapTalk.io user ID to the active user's contacts.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] addToTapTalkContactsWithUserID:USER_ID
success:^{
    // Successfully added contact
}
failure:^(NSError * _Nonnull error) {
    // Failed to add contact
}];

Parameters USER_ID: (String) Taptalk.io User ID of the contact to be added

Add User to Contacts with Phone Number

Add a user with selected phone number to the active user's contacts.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] addToTapTalkContactsWithPhoneNumber:PHONE_NUMBER
success:^{
    // Successfully added contact
}
failure:^(NSError * _Nonnull error) {
    // Failed to add contact
}];

Parameters PHONE_NUMBER: (String) phone number of the contact to be added

Remove User from Contacts

Remove a user with selected TapTalk.io user ID from the active user's contacts.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] removeFromTapTalkContactsWithUserID:USER_ID
success:^(NSString * _Nonnull successMessage) {
    // Successfully removed contact
}
failure:^(NSError * _Nonnull error) {
    // Failed to remove contact
}];

Parameters USER_ID: (String) Taptalk.io User ID of the contact to remove.

Save User Data

Save or update existing user data to local cache.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] saveUserData:USER];

Parameters USER: (TAPUserModel) the user data model to be saved

Search Local Contact

Call this method to search the active user's contacts from the device's local storage with a keyword. Provided keyword will be used to filter the contacts' full name in the search result.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] searchLocalContactsByName:KEYWORD
success:^(NSArray<TAPUserModel *> * _Nonnull userArray) {
    // Returns filtered contacts
}
failure:^(NSError * _Nonnull error) {
    // Failed to get contact list data
}];

Parameters KEYWORD: (String) search keyword to filter full name

Report User

You may call this method to submit a report for a selected user. Submitted reports can then be viewed through the dashboard.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] reportUser:USER_ID 
                                         category:CATEGORY
                                  isOtherCategory:IS_OTHER_CATEGORY
                                           reason:REASON
success:^(BOOL isSuccess) {
    // Successfully reported user
}
failure:^(NSError * _Nonnull error) {

}];

Parameters USER_ID: (String) ID of the user to report CATEGORY: (String) Category of the violation. max length is 100 characters IS_OTHER_CATEGORY: (Boolean) If the category is other than the predefined categories REASON: (String) reason why the user is reported

Report Message

You may call this method to submit a report for a selected message. Submitted reports can then be viewed through the dashboard.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] reportMessage:MESSAGE_ID 
                                              roomID:ROOM_ID
                                            category:CATEGORY
                                     isOtherCategory:IS_OTHER_CATEGORY
                                              reason:REASON
success:^(BOOL isSuccess) {
    // Successfully reported message
}
failure:^(NSError * _Nonnull error) {

}];

Parameters MESSAGE_ID: (String) unique server ID of the message to report ROOM_ID: (String) ID of the room where the message belongs to CATEGORY: (String) Category of the violation. max length is 100 characters IS_OTHER_CATEGORY: (Boolean) If the category is other than the predefined categories REASON: (String) reason why the message is reported

Block User

You may block a user to stop conversation flow with the blocked user. Blocked users will not be able to send and receive message, or retrieve profile info from the active user.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] blockUserWithUserID:USER_ID 
success:^(TAPUserModel *blockedUser) {
    // Successfully blocked user
}
failure:^(NSError * _Nonnull error) {

}];

Parameters USER_ID: (String) ID of the user to block

Unblock User

You may unblock a blocked user to let them send and receive message from the active user.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] unblockUserWithUserID:USER_ID 
success:^(BOOL isSuccess) {
    // Successfully unblocked user
}
failure:^(NSError * _Nonnull error) {

}];

Parameters USER_ID: (String) ID of the user to unblock

Get Blocked User List

You may call this method to retrieve a list of blocked users.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] getBlockedUserList:^(NSArray<TAPUserModel *> *blockedUserList) {
    // Successfully retrieved blocked users
}
failure:^(NSError * _Nonnull error) {

}];

Get Blocked User IDs

You may call this method to retrieve a list of IDs from blocked users.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] getBlockedUserIDs:^(NSArray<NSString *> *blockedUserIDs) {
    // Successfully retrieved blocked user IDs
}
failure:^(NSError * _Nonnull error) {

}];

Get Groups in Common

You may use getGroupsInCommon method to retrieve the list of groups in common with another user.

#import <TapTalk/TapCoreContactManager.h>

[[TAPCoreContactManager sharedManager] getGroupsInCommon:USER_ID 
success:^(NSArray<TAPRoomModel *> *groupRooms) {
    // Successfully retrieved rooms
}
failure:^(NSError * _Nonnull error) {

}];

Parameters USER_ID: (String) ID of the other user

PreviousChat Room and Messages - TapCoreNextMessage Type

Last updated 28 days ago

Was this helpful?

Get Contact List
Fetch All User Contacts from Server
Get Contact Detail Info with TapTalk User ID
Get Contact Detail Info with Client User ID
Add User to Contact with User ID
Add User to Contact with Phone Number
Remove User from Contact
Save User Data
Search Local Contact
Report User
Report Message
Block User
Unblock User
Get Blocked User List
Get Blocked User IDs
Get Groups in Common