Help Center/ Meeting/ Client SDK Reference/ macOS SDK/ APIs/ UI Customization/ Customizing Contact Information
Updated on 2022-07-11 GMT+08:00

Customizing Contact Information

queryUserDetailByNumbers: completionBlock:

API Description

This API is used to inject contact information.

Precautions

  1. You need to subscribe to the HWMContactApiHandler proxy object to use the API.
Figure 1 Injected department information displayed in the tooltip
Figure 2 Customizing the display mode of mobile numbers

Method Definition

/// Query a contact by number (SIP number).
/// @param numbers number set
/// @param completionBlock result callback. If there is a value in NSArray, an error will not be returned.
/// Return the query result (userInfos) to the SDK.
- (void)queryUserDetailByNumbers:(NSArray<NSString *> *)numbers
                      completionBlock:(void (^)(NSError *_Nullable error, NSArray<HWMEnterpriseContact *> *_Nullable userInfos))completionBlock;

Parameter Description

Table 1

Parameter

Type

Description

numbers

NSArray

SIP number of the contact to be injected.

Return Values

None

Sample Code

- (void)queryUserDetailByNumbers:(NSArray<NSString *> *)numbers completionBlock:(void (^)(NSError * _Nullable, NSArray<HWMEnterpriseContact *> * _Nullable))completionBlock {
    NSArray *data = [self searchContactsWithKeys:numbers isNumber:YES];// Contact array obtained through the numbers array.
    completionBlock(nil,data); // Return the data source to the SDK.
}