简体   繁体   中英

How to get users by name using QuickBlox SDK iOS

i am integrating QuickBlox SDK in iOS App.i wanted to fetch all the users with the username.how to get this done with Quickblox.what search query is to be made.Please suggest me any ideas on this.

Use Case: whenever user enters some characters in the SearchBar then i have to fetch all my QuickBlox users with that name.

You should use method:

+ (QB_NONNULL QBRequest *)usersWithFullName:(QB_NONNULL NSString *)userFullName
                                   page:(QB_NULLABLE QBGeneralResponsePage *)page
                           successBlock:(QB_NULLABLE void (^)(QBResponse * QB_NONNULL_S response, QBGeneralResponsePage * QB_NULLABLE_S page, NSArray QB_GENERIC(QBUUser *) * QB_NULLABLE_S users))successBlock
                             errorBlock:(QB_NULLABLE void (^)(QBResponse * QB_NONNULL_S response))errorBlock;

where userFullName will be your string from the search bar

Pagination parameter (for example):

 QBGeneralResponsePage * page = [QBGeneralResponsePage responsePageWithCurrentPage:1 perPage:100]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM