tencent cloud

Feedback

Last updated: 2022-05-30 16:03:57

    This document describes how to quickly run the IM 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.
  • Install Visual Studio 2019.
  • 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 IM 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 IM apps. If you want to create a new app, disable and delete an unwanted app first. 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 target app card to go to the basic configuration page of the app.
    2. In the Basic Information area, click Display key, and then copy and save the key information.
      Note:

      Please store the key information properly to prevent disclosure.

    Step 3. Configure the demo project file

    1. Download the IM 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:
      • SDKAPPID: `0` by default. Set it to the actual `SDKAppID`.
      • SECRETKEY: left empty by default. Set it to the actual key.
    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.

      File -> Package Project -> Mac

    API Documentation of IM 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