开发端 | 环境 |
Android | Android Studio 4.0 及以上版本。 Visual Studio 2017 15.6 及以上版本。 只支持真机调试。 |
iOS & macOS | Xcode 11.0 及以上版本。 OSX 系统版本要求 10.11 及以上版本 。 请确保您的项目已设置有效的开发者签名。 |
Windows | 操作系统:Windows 7 SP1 及以上版本(基于 x86-64 的 64 位操作系统)。 磁盘空间:除安装 IDE 和一些工具之外还应有至少 1.64 GB 的空间。 |
// 加载各个平台 Chat 底层库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"));}}
#include "V2TIMManager.h"
// 获取sdk单例对象V2TIMManager* timInstance = V2TIMManager::GetInstance();// 获取sdk版本号V2TIMString timString = timInstance->GetVersion();// 初始化sdkV2TIMSDKConfig timConfig;timConfig.initPath = static_cast<V2TIMString>("D:\\\\");timConfig.logPath = static_cast<V2TIMString>("D:\\\\");bool isInit = timInstance->InitSDK(SDKAppID, timConfig);
本页内容是否解决了您的问题?