Legacy SDK APIs (iOS & Mac)

Last updated: 2021-01-06 15:17:51

    TIMManager

    As a core module of the IM SDK, TIMManager works for initialization, login, conversation creation, and push management of the IM SDK.

    • Initialization: the prerequisite for using the IM SDK. You need to call the init API first before calling other APIs.
    • Login: you need to configure the SDKAppID, UserID, and UserSig before using IM.
    • Conversation: each time you start a conversation, you open a conversation window. A conversation can be a C2C chat or a group chat.
    • Push: you can configure and manage features related to offline push, including tokens and feature enabling/disabling.

    Initialization APIs

    API Description
    sharedInstance Obtains the instance of TIMManager.
    initSdk Initializes the SDK and specifies the global configurations.
    unInit Uninitialize the SDK.
    getGlobalConfig Obtains global configurations.
    setUserConfig Specifies user configurations.
    getUserConfig Obtains user configurations.
    addMessageListener Adds a message receiving listener.
    removeMessageListener Deletes a message receiving listener.

    Login APIs

    API Description
    login Logs in.
    autoLogin Enables auto-login.
    logout Logs out.
    getLoginUser Obtains the login user.
    getLoginStatus Obtains the current login status.

    Conversation management APIs

    API Description
    getConversationList Obtains the list of conversations.
    getConversation Obtains a conversation.
    deleteConversation Deletes a conversation.
    deleteConversationAndMessages Deletes a conversation and its messages.

    Configures APNs push

    API Description
    setToken Configures the client token and the certificate business ID.
    setAPNS Configures APNs.
    getAPNSConfig Obtains the APNs configurations.
    doBackground Reports that the app is running in the backend.
    doForeground Reports that the app is running in the frontend.

    APIs for querying local conversations and messages without login

    API Description
    initStorage Loads the local storage without login.

    Debugging APIs

    API Description
    GetVersion Obtains the version number.
    log Prints the log.
    getLogPath Obtains the log file path.
    getIsLogPrintEnabled Obtains the log printing status.
    getLogLevel Obtains the log level.

    TIMConversation

    Each time you start a conversation, you open a conversation window. A conversation can be a C2C chat or a group chat.
    All API functions provided by TIMConversation are about message operations, including sending messages, obtaining message history, setting read receipt, recalling messages, and deleting messages.

    APIs for sending messages

    API Description