• UIKit
  • SDK
  • 서버 API
Chat/
UIKit/
iOS 및 macOS/
기능/
UIKit
  • 개요
    • 개요
    • 기능 개요
    • 가격
      • 청구 개요
      • 가격
      • Billing of Chat Out-of-Package Usage
  • 시작하기
    • 데모 실행
    • 첫 메시지 보내기
    • 통합 구성 요소
      • TUIKit
      • TUIChat 전용
    • Secure authentication with UserSig
  • 기본 인터페이스 구축
    • 채팅 인터페이스
    • 대화 목록
    • 연락처 목록
    • 연락처 추가
    • 그룹 채팅 만들기
    • 영상 및 음성 통화
  • 기능
    • 반응 추가하기
    • 메시지 인용
    • 읽음 확인
    • 사용자 온라인 상태
    • 텍스트 메시지 번역
    • 메시지 검색
    • Integrating Offline Push
      • Manufacturer configuration
      • Quick Integration
      • Client APIs
  • 사용자 정의
    • 스타일 사용자 정의
      • Global
      • Chat
      • Conversation List
      • Group Settings
      • Contact Settings
    • 메시지 사용자 정의
    • 이모티콘 및 스티커 사용자 정의
  • 현지화
  • 변경 내역
  • 콘솔 안내
    • New Console Introduction
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
    • Usage Statistics
    • Real-Time Monitor
    • Auxiliary Development Tools
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • Scenario-based Practice
    • AI Chatbot
    • Super Large Entertainment and Collaboration Community
    • Discord Implementation Guide
  • Push Service
    • Overview
    • Activate the Service
    • Quick Start
    • Manufacturer Channel
      • Manufacturer Configuration
        • Android
        • iOS
        • Flutter
        • React-Native
      • Quick Integration
        • Android
        • iOS
        • Flutter
        • React-Native
    • Statistics
    • Troubleshooting Tool
    • Client APIs
      • Android
      • iOS
      • Flutter
      • React Native
    • REST API
      • Pushing to All/Tagged Users
      • UserID-Targeted Push
      • Obtaining Application Attribute Names
      • Setting Application Attribute Names
      • Obtaining User Attributes
      • Setting User Attributes
      • Deleting User Attributes
      • Obtaining User Tags
      • Adding User Tags
      • Deleting User Tags
      • Deleting All User Tags
      • Recalling Push
    • Push Callback
      • All Users / Tags / UserID Push Callback
      • Other Push Callbacks
    • Advanced Features
      • Custom Definition Badge
      • Custom Definition Ringtone
      • Customized Icon
      • Custom Definition Click Redirect
      • Push Message Categorization
    • Release Notes
      • Android
      • iOS
      • Flutter
      • React Native
    • FAQS
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

메시지 검색

Local search is implemented in the TUISearch component of TUIKit. It allows users to quickly find the expected information from massive amounts of complex data, such as the chat history, contacts, and group chats. It can also be used as an operations tool to easily and efficiently navigate to extensive content.
Note:
The local search feature is only available on the Chat Pro edition 、Pro Plus edition or Enterprise edition. To use it, purchase the Pro edition 、Pro Plus edition or Enterprise edition. For more information, see Pricing.

Feature Demonstration

The search API UI consists of three parts: the first part is for friend search, the second part is for group and group member search, and the third part is for message search, where messages are classified by conversation. Download and install the app to experience it now.

Integration Guide

The following introduces how to integrate the TUISearch component.

Purchasing the package

Integrating TUISearch

Add the following content to your Podfile:
// Integrate TUISearch
pod 'TUISearch'
Run pod instal.

Logging in to TUIKit

You need to call TUILogin of TUICore to log in to TUIKit. Initialization is implemented inside the login API by default, and no additional call to the initialization API is required.
[TUILogin login:SDKAPPID
userID:userID
userSig:userSig
succ:^{
// Login succeeded
} fail:^(int code, NSString *msg) {
// Login fails.
}];

Starting the search UI

If you have integrated the TUIConversation and TUISearch components, no additional processing is required at this point and searchBar is displayed above the conversation list by default.

If you have integrated only TUISearch, you can directly initialize TUISearchBar and add it to your own view. The search UI logic and UI are encapsulated inside TUISearchBar. After adding TUISearchBar, you can click it to trigger a search.
Sample code:
// Initialize the component
TUISearchBar *searchBar = [[TUISearchBar alloc] init];
// self.containerView indicates your own view
[self.containerView addSubview:searchBar];

FAQs

How do I search for custom messages?

You need to use the createCustomMessage:desc:extension API to create and send a custom message, and specify the text to search in the desc parameter.
If you use the createCustomMessage API to create a custom message, a binary data stream is saved locally, and the custom message cannot be searched.
If you configure the offline push feature and specify the desc parameter, the custom message will also be pushed offline, and the content specified in the desc parameter will be displayed in the notification bar. If you do not need the offline push feature, use the disablePush parameter in V2TIMOfflinePushInfo of the sendMessage API to disable it.
If you do not want the searched text to be displayed as the pushed content, use the desc parameter in V2TIMOfflinePushInfo to specify the pushed content.

How do I search for rich media messages?

Rich media messages include file, image, audio, and video messages.
For a file message, the filename is usually displayed on the UI. Therefore, you can set the fileName parameter as the searched content when creating a file message. If fileName is not set, the system gets the filename from filePath and saves it to both the local device and the server.
For an image, audio, or video message, the thumbnail or duration is usually displayed on the UI. In this case, you can specify the message type for search but cannot specify keywords for search.
커뮤니티에 질문하십시오!
기술적인 논의를 시작하고 즉시 전문가 지원을 받으세요!