This document describes how to quickly run the IM demo for Unreal Engine.
Currently, the demo can be run on Windows, macOS, iOS, and Android.
Unreal Engine 4.27.1 or later.
||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.
||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.
You have signed up for a Tencent Cloud account and completed identity verification.
Step 1. Create an app
- Log in to the IM console.
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.
- Click Create Application, enter your app name, and click Confirm.
- 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
- Click the target app card to go to the basic configuration page of the app.
- In the Basic Information area, click Display key, and then copy and save the key information.
Please store the key information properly to prevent disclosure.
Step 3. Configure the demo project file
- Download the IM demo project from Download the Demo.
- Find and open
- 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.
- 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
- Double-click to open
- Compile, run, and test the project.
File -> Package Project -> Mac
File -> Package Project -> Windows -> Windows(64-bit)
File -> Package Project -> Mac
- For development and testing, see Android Quick Start.
- For packaging, see Packaging Android Projects.
API Documentation of IM Unreal Engine
For more information on APIs, see API Overview.
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:
ls (you should see the UE4Game directory listed)
rm -r UE4Game
Compile your project again.