Release Notes
Announcements
Plugins directory under the project. In the Build.cs file of the main module, introduce TIMPush.copy directory | Introduce plug-in |
![]() | ![]() |

Additional Plist Data, modify the following text and copy it into the textbox. YourBusinessID is required, while YourGroupID needs to be modified when you need to count push reach and click data.<key>businessID</key><string>YourBusinessID</string><key>TIMPushAppGroupID</key><string>YourGroupID</string>

<proj_dir>/Config/DefaultEngine.ini" and add the following under IOSRuntimeSettings in the script:// Some code[/Script/IOSRuntimeSettings.IOSRuntimeSettings]bEnableRemoteNotificationsSupport=True


timpush-configs.json file under the Source/ThirdParty/TIMPushLibrary/Android/TIMPush/Assets directory.download configuration file | copy path |
![]() | ![]() |

<buildGradleAdditions><insert>dependencies {// Push main package requires integrationimplementation 'com.tencent.timpush:tpush:VERSION'// Integrate corresponding manufacturers as neededimplementation 'com.tencent.timpush:huawei:VERSION'implementation 'com.tencent.timpush:xiaomi:VERSION'implementation 'com.tencent.timpush:oppo:VERSION'implementation 'com.tencent.timpush:vivo:VERSION'implementation 'com.tencent.timpush:honor:VERSION'implementation 'com.tencent.timpush:meizu:VERSION'implementation 'com.tencent.timpush:fcm:VERSION'}</insert></buildGradleAdditions>
<buildGradleAdditions><insert>android {defaultConfig {manifestPlaceholders = ["VIVO_APPKEY" : "xxxxxx", // VIVO AppKey"VIVO_APPID" : "xxxxxx", // VIVO AppId"HONOR_APPID" : "xxxxxx" // Honor AppId]}}</insert></buildGradleAdditions>
Source/ThirdParty/TIMPushLibrary/Android/TIMPush/.



<baseBuildGradleAdditions><insert>allprojects {repositories {mavenCentral()maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }maven { url "https://mirrors.tencent.com/repository/maven/liteavsdk/" }maven { url 'https://developer.huawei.com/repo/' }maven { url 'https://mirrors.tencent.com/repository/maven/SensitiveScan' }maven { url 'https://developer.hihonor.com/repo' }}}</insert></baseBuildGradleAdditions><buildscriptGradleAdditions><insert>repositories {mavenCentral()maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }maven { url "https://mirrors.tencent.com/repository/maven/liteavsdk/" }maven { url 'https://developer.huawei.com/repo/' }maven { url 'https://mirrors.tencent.com/repository/maven/SensitiveScan' }maven { url 'https://developer.hihonor.com/repo' }}dependencies {classpath 'com.google.gms:google-services:4.4.3' // FCM Pluginclasspath 'com.huawei.agconnect:agcp:1.9.1.300' // Huawei Pluginclasspath 'com.hihonor.mcs:asplugin:2.0.1.300' // Honor Plugin}</insert></buildscriptGradleAdditions><buildGradleAdditions><insert>apply plugin: 'com.google.gms.google-services' // FCM Pluginapply plugin: 'com.huawei.agconnect' // Huawei Pluginapply plugin: 'com.hihonor.mcs.asplugin' // Honor Plugin</insert></buildGradleAdditions>

class DemoPushListener: public PushListener {public:using OnRecvPushMessageCallback = std::function<void(const PushMessage &)>;using OnRevokePushMessageCallback = std::function<void(const FString &)>;using OnNotificationClickedCallback = std::function<void(const FString &)>;void SetCallback(OnRecvPushMessageCallback recv_cb, OnRevokePushMessageCallback revoke_cb, OnNotificationClickedCallback clicked_cb) {on_recv_message_callback_ = std::move(recv_cb);on_revoke_message_callback_ = std::move(revoke_cb);on_notification_clicked_callback_ = std::move(clicked_cb);}void OnRecvPushMessage(const PushMessage& message) override {if (on_recv_message_callback_) {on_recv_message_callback_(message);}}void OnRevokePushMessage(const FString& messageID) override {if (on_revoke_message_callback_) {on_revoke_message_callback_(messageID);}}void OnNotificationClicked(const FString& ext) override {if (on_notification_clicked_callback_) {on_notification_clicked_callback_(ext);}}private:OnRecvPushMessageCallback on_recv_message_callback_;OnRevokePushMessageCallback on_revoke_message_callback_;OnNotificationClickedCallback on_notification_clicked_callback_;};auto listener = new DemoPushListener();listener.SetCallback([](const PushMessage& message) {UE_LOG(LogTemp, Warning, TEXT("Push Called in OnRecvPushMessage. Message title: %s, desc: %s, ext: %s, id: %s"), *message.GetTitle(), *message.GetDesc(), *message.GetExt(), *message.GetMessageID());},[](const FString& messageID) {UE_LOG(LogTemp, Warning, TEXT("Push Called in OnRevokePushMessage. Message id: %s"), *messageID);},[](const FString& ext) {UE_LOG(LogTemp, Warning, TEXT("Push Called in OnNotificationClicked. Message ext: %s"), *ext);});PushManager::GetInstance()->AddPushListener(&DEMO_PUSH_LISTENER);
template <class T>class DemoPushValueCallback : public PushValueCallback<T> {public:using SuccessCallback = std::function<void(const T &)>;using ErrorCallback = std::function<void(int, const FString &)>;DemoPushValueCallback<T>() = default;~DemoPushValueCallback() override = default;void SetCallback(SuccessCallback success_cb, ErrorCallback error_cb) {success_callback_ = std::move(success_cb);error_callback_ = std::move(error_cb);}void OnSuccess(const T &value) override {if (success_callback_) {success_callback_(value);}}void OnError(int error_code, const FString &error_message) override {if (error_callback_) {error_callback_(error_code, error_message);}}private:SuccessCallback success_callback_;ErrorCallback error_callback_;};auto callback = new DemoPushValueCallback<FString>();callback->SetCallback([=](const FString &value) {UE_LOG(LogTemp, Warning, TEXT("Push succeed, device token is %s"), *value);delete callback;},[=](int error_code, const FString &error_message) {UE_LOG(LogTemp, Warning, TEXT("Push failed erro code: %d, desc: %s"), error_code, *error_message);delete callback;});PushManager::GetInstance()->RegisterPush(your sdkAppId, "your appKey", callback);


Callback Address Configuration | Receipt ID Configuration in the IM Console |
![]() Receipt Address: Singapore :https://apisgp.im.qcloud.com/v3/offline_push_report/vivo Korea: https://apikr.im.qcloud.com/v3/offline_push_report/vivo USA: https://apiusa.im.qcloud.com/v3/offline_push_report/vivo Germany: https://apiger.im.qcloud.com/v3/offline_push_report/vivo Indonesia: https://apiidn.im.qcloud.com/v3/offline_push_report/vivo China: https://api.im.qcloud.com/v3/offline_push_report/vivo | ![]() |
Enable Receipt Switch | Configure Receipt Address |
![]() | ![]() |
Editor - Add Target in the Xcode project.Plugins-TIMPush-Source-ThirdParty-TIMPushLibrary-iOS path of the project root directory, and add the internal .framework folder to your pushservice target in the Xcode project.-didReceiveNotificationRequest:withContentHandler: method:@implementation NotificationService- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {//appGroup indicates the shared APP Group between the main APP and Extension, and the App Groups capacity needs to be configured in the main APP's Capability.//Format: group + [main bundleID] + key//for example group.com.tencent.im.pushkeyNSString * appGroupID = kTIMPushAppGroupKey;__weak typeof(self) weakSelf = self;[TIMPushManager handleNotificationServiceRequest:request appGroupID:appGroupID callback:^(UNNotificationContent *content) {weakSelf.bestAttemptContent = [content mutableCopy];// Modify the notification content here...// self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]", self.bestAttemptContent.title];weakSelf.contentHandler(weakSelf.bestAttemptContent);}];}@end

Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback