BDKUserInfoFetcher

Objective-C

@protocol BDKUserInfoFetcher <NSObject, NSCopying>

Swift

protocol BDKUserInfoFetcher : NSCopying, NSObjectProtocol

Classes conforming to this protocol must provide the user info display items for the user aliases requested. BandyerSDK will ask the fetcher to provide user details when user information is or is going to be needed, for example the SDK might ask user information when it must update the user interface when an outgoing call is being performed. Bandyer does not own user information like user’s first name, last name, email addresses and so on. It is Bandyer client responsibility to provide those information through this protocol.

  • This method will be invoked when user information are needed by the BandyerSDK. Beware, this method might be invoked an a background system queue, an it should invoke the completion block provided within a short period of time (less than half of a second), otherwise the values provided will be ignored and default values will be used instead.

    Declaration

    Objective-C

    - (void)fetchUsers:(nonnull NSArray<NSString *> *)aliases
            completion:(nonnull void (^)(
                           NSArray<BDKUserInfoDisplayItem *> *_Nullable))completion;

    Swift

    func fetchUsers(_ aliases: [String], completion: @escaping ([BDKUserInfoDisplayItem]?) -> Void)

    Parameters

    aliases

    The user id of the users for which display information must be fetched.

    completion

    The completion block that must be called when user display items have been fetched.