tencent cloud

Feedback

Last updated: 2024-04-10 17:47:55
    This document describes how to quickly run the Chat demo for Unreal Engine.
    Note:
    Currently, the demo can be run on Windows, macOS, iOS, and Android.

    Environment Requirements

    Unreal Engine 4.27.1 or later.
    Platform
    Environment
    Android
    Android Studio 4.0 or later.
    Visual Studio 2017 15.6 or later.
    A real device for testing.
    iOS & macOS
    Xcode 11.0 or later.
    OSX 10.11 or later.
    Ensure your project has a valid developer signature.
    Windows
    OS: Windows 7 SP1 or later (64-bit based on x86-64).
    Disk capacity: At least 1.64 GB free space after the IDE and required tools are installed.
    

    Prerequisites

    You have signed up for a Tencent Cloud account and completed identity verification.

    Directions

    

    Step 1. Create an app

    1. Log in to the Chat console. 
    Note:
    If you already have an app, record its SDKAppID and obtain key information.
    A Tencent Cloud account can create a maximum of 300 Chat apps, after which you need to disable and delete an unwanted app before creating a new one. Once an app (along with its SDKAppID) is deleted, the service it provides and all its data are lost. Proceed with caution.
    2. Click Create Application, enter your app name, and click Confirm.
    
    
    3. After creation, you can see the status, service version, SDKAppID, creation time, tag, and expiry time of the new app on the overview page of the console. Record the SDKAppID.
    
    
    

    Step 2. Obtain key information

    1. Click the app to go to its basic configuration page.
    
    
    2. In the Basic Information area, click Display key, and then copy and save the key information.
    Caution:
    Make sure you keep your key information properly secure to prevent disclosure.
    

    Step 3. Configure the demo project file

    1. Download the Chat demo project from Download the Demo.
    2. Find and open /IM_Demo/Source/debug/include/DebugDefs.h.
    3. Set parameters in DebugDefs.h as follows:
    Note:
    In this document, the method to obtain UserSig is to configure a SECRETKEY in the client code. In this method, the SECRETKEY is vulnerable to decompilation and reverse engineering. Once your SECRETKEY is disclosed, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for locally running a demo project and feature debugging.
    The correct UserSig distribution method is to integrate the calculation code of UserSig into your server and provide an application-oriented API. When UserSig is needed, your application can send a request to the business server for a dynamic UserSig. For more information, see Generating UserSig on the Server.
    

    Step 4. Compile, package, and run the project

    1. Double-click to open /IM_Demo/IM_Demo.uproject.
    2. Compile, run, and test the project.
    macOS
    Windows
    iOS
    Android
    File -> Package Project -> Mac
    File -> Package Project -> Windows -> Windows(64-bit)
    
    
    Package Project File -> Package Project -> Mac
    1. For development and testing, see Android Quick Start.
    2. For packaging, see Packaging Android Projects.

    Chat API Documentation for Unreal Engine

    For more information on APIs, see API Overview.

    FAQs

    What should I do if the error "Attempt to construct staged filesystem reference from absolute path" occurs on Android?

    Close the project in UE4, open CMD, and run the following commands:
    adb shell
    
    cd sdcard
    
    ls (you should see the UE4Game directory listed)
    
    rm -r UE4Game
    
    Compile your project again.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support