• UIKit
  • SDK
  • 서버 API
Chat/
SDK/
Unreal Engine(Game Solution)/
SDK
  • SDK 통합
  • Guideline for Beginners
  • 콘솔 안내
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • 구매 가이드
    • 과금 개요
    • 가격
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

SDK 통합

This document describes how to quickly integrate the Tencent Cloud IM SDK (Unreal Engine) to your projects. To configure and integrate the SDK, follow these steps.

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 of space after the IDE and required tools are installed.


Integrating the SDK

1. Download the SDK and SDK source code.
2. Copy the IM SDK folder to the Source/[project_name] directory of your project ([project_name] is the name of your project).
3. Add the following function to the [project_name].Build.cs file in your project.
// Load the IM underlying libraries of platforms
private void loadTIMSDK(ReadOnlyTargetRules Target) {
string _TIMSDKPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "TIMSDK"));
bEnableUndefinedIdentifierWarnings = false;
PublicIncludePaths.Add(Path.Combine(_TIMSDKPath, "include"));
if (Target.Platform == UnrealTargetPlatform.Android) {
PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });
AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(ModuleDirectory, "TIMSDK", "Android", "APL_armv7.xml")));

string Architecture = "armeabi-v7a";
// string Architecture = "arm64-v8a";
// string Architecture = "armeabi";
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory,"TIMSDK", "Android", Architecture, "libImSDK.so"));
}
else if (Target.Platform == UnrealTargetPlatform.IOS) {
PublicAdditionalLibraries.AddRange(
new string[] {
"z","c++",
"z.1.1.3",
"sqlite3",
"xml2"
}
);
PublicFrameworks.AddRange(new string[]{
"Security",
"AdSupport",
"CoreTelephony",
"CoreGraphics",
"UIKit"
});
PublicAdditionalFrameworks.Add(new UEBuildFramework("ImSDK_CPP",_TIMSDKPath+"/ios/ImSDK_CPP.framework.zip", ""));
}
else if(Target.Platform == UnrealTargetPlatform.Mac) {
PublicAdditionalLibraries.AddRange(new string[] {
"resolv",
"z",
"c++",
"bz2",
"sqlite3",
});
PublicFrameworks.AddRange(
new string[] {
"AppKit",
"Security",
"CFNetwork",
"SystemConfiguration",
});
PublicFrameworks.Add(Path.Combine(_TIMSDKPath, "Mac", "Release","ImSDKForMac_CPP.framework"));
}
else if (Target.Platform == UnrealTargetPlatform.Win64) {
PublicAdditionalLibraries.Add(Path.Combine(_TIMSDKPath, "win64", "Release","ImSDK.lib"));
PublicDelayLoadDLLs.Add(Path.Combine(_TIMSDKPath, "win64", "Release", "ImSDK.dll"));
RuntimeDependencies.Add("$(BinaryOutputDir)/ImSDK.dll", Path.Combine(_TIMSDKPath, "win64", "Release", "ImSDK.dll"));
}
}
4. Call the function in the [project_name].Build.cs file:

5. You have successfully integrated the IM SDK. You can use IM features in your CPP file via #include "V2TIMManager.h".
// Get the SDK singleton object
V2TIMManager* timInstance = V2TIMManager::GetInstance();
// Get the SDK version number
V2TIMString timString = timInstance->GetVersion();
// Initialize the SDK
V2TIMSDKConfig timConfig;
timConfig.initPath = static_cast<V2TIMString>("D:\\");
timConfig.logPath = static_cast<V2TIMString>("D:\\");
bool isInit = timInstance->InitSDK(SDKAppID, timConfig);

Packaging

macOS
Windows
iOS
Android
File -> Package Project -> Mac
File -> Package Project -> Windows -> Windows(64-bit)

Go to File > Package Project > iOS to package your project
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.