このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

uniapp

TencentCloud-TIMPush is a Tencent Cloud Chat Push plugin. Currently, the push supports channels from manufacturers such as Mi, Huawei, Honor, OPPO, Vivo, Meizu, APNs, OnePlus, realme, iQOO, and Apple.
Android
iOS

Register an application with the vendor push platform

To utilize the offline push feature, you need to register your app on each vendor's push platform to obtain parameters such as AppID and AppKey. Currently, the mobile manufacturers supported in China include: Mi, Huawei, Honor, OPPO, Vivo, Meizu, and internationally Google FCM is supported.
Mi
Huawei
OPPO
vivo
Meizu
HONOR
Google FCM

Step 1: Register a Xiaomi Developer Account

Visit Xiaomi Open Platform, register a Xiaomi developer account. For details, refer to Enterprise Developer Account Registration Process.

Step 2: Create an Application

1. In the management console, click Message Push.
Note:
If you log in with a personal account, it will display "Sorry, you currently do not have push/review permissions".

2. Create an application, complete the application information page, and click Save.


Note:
The application package name should be consistent with the plugin application package name.


Step 3: Enable Push

Go to the Application List page on the Push Operation Platform, click on the corresponding application name to Enable Push, and confirm to enable.


Step 4: View and Obtain Application Information

Enter the Application Information page on the Push Operation Platform, and review the Application Information.



Step 5: Configure Push Certificate

Log in to Tencent Cloud Chat Console, go to Push > Access Settings feature section to add vendor push certificates, and configure the parameters such as AppId, AppKey, AppSecret obtained from the vendor to the added push certificate.
Vendor Push Platform
Configuring in the IM console

Note:
Specified in-app page link cannot be modified. This configuration is for dispatching event listening for the offline push plugin after a click; direct configuration of in-app page navigation is not allowed.


Step 1: Register a Huawei Developer Account

Go to Huawei Developer Alliance, register for a Huawei Developer Account. For details, please refer to Register Account.

Step 2: Create an Application

1. In the Account Center, click My Projects to add a new project.

2. In the Project Settings section, click Push Service > Activate Now.

3. Click Project Settings > API Management to enable permissions for the push service.


Step 3. Add Application

Click Project Settings > General to add an application.
Note:
The application package name should be consistent with the plugin application package name.


Step 4: Obtain Application Information

Click Project Settings > General to obtain application information.
Note:
The General page contains the Client ID and Client Secret for both projects and applications, which have inconsistent parameters. Please scroll down to the bottom of the page to obtain the application's Client ID and Client Secret.
You must add the SHA256 Certificate Fingerprint, which should match the SHA256 Certificate Fingerprint of your own packaging certificate.
Download the agconnect-services.json file and place it in the project under: nativeResources/android/assets/ path.
If you modify the project, application information, or development service settings, you need to re-download the agconnect-services.json file.



Step 5: Add Push Certificate

Log in to Tencent Cloud Chat Console, click Push > Access Settings to add vendor push certificates, and configure the obtained vendor's AppId, AppKey, AppSecret, and other parameters to the added push certificate.
Vendor Push Platform
Configuring in the IM console

Note:
Client ID corresponds to AppID, Client Secret corresponds to AppSecret.
Specified in-app page link cannot be modified. This configuration is for dispatching event listening for the offline push plugin after a click; direct configuration of in-app page navigation is not allowed.

Note:
Notification Bar Push: The app needs to be published on the OPPO Software Store;
Notification Bar Push Test Permission: Only 1,000 messages can be pushed per day, limited to testing purposes. After the app is published, you need to reapply for "Notification Bar Push" permission to obtain a normal message push quantity;
The platform will return review results within 1 business day. Developers can view the review results on the application page. For other inquiries, consult the Open Platform Customer Service.

Step 1: Register an OPPO Developer Account

Enter OPPO Open Platform, register an OPPO Developer Account. For details, see OPPO Enterprise Developer Account Registration.

Step 2: Create an Application

Enter the OPPO Open Platform, click Product > Application Distribution> OPPO Software Store > Release Application to access the Management Center and create an application.




Step 3: Activate the PUSH Service

1. Enter the OPPO Open Platform, click Product > Mobile Services > Push Service to access the Push Homepage, then click Apply for access to activate the Push Service.

2. Click to enter the Management Center > Application List > Apply for Push Services interface, to apply for push permissions for applications not yet enabled.
Note:
Enabled Services: Applications that have applied for PUSH permissions and have been approved.
Disabled Services: Applications that can apply for PUSH permissions.


3. Click Apply for activation. In the Disabled Services, click on the application that needs to apply for PUSH permissions, enter the PUSH Service and click Apply for activation.


Step 4: Add Push Certificate

Log in to Tencent Cloud Chat Console, go to Push > Access Settings feature section to add vendor push certificates, and configure the parameters such as AppId, AppKey, AppSecret obtained from the vendor to the added push certificate.
Vendor Push Platform
Configuring in the IM console





Note:
Specify In-App Interface Link, cannot be modified.
This configuration is for event listening of the offline push plugin after a click, direct configuration of in-app page redirect is not allowed.





Note:
If the application is not listed in the App Marketplace, push permissions are restricted. Official messages cannot be sent through the Vivo official website's Web Interface or API backend. However, test messages can be sent to set test devices through the API backend for testing.

Step 1: Register a Vivo Developer Account

Enter Vivo Open Platform, register a Vivo Developer Account. For details, see Vivo Enterprise Developer Account Registration.

Step 2. Create an application

Enter Vivo Open Platform, click Distribution > Application Distribution > App Store > Upload Application to create your application.


Step 3:Enable Push Notification

Enter the Management Center and click Push Service > Push Notification Application to apply for enabling push for the newly created application.



Step 4: Obtain Application Information

Go to the Push Operation Platform and click Application Management > Application Information to obtain application information.


Step 5: Add Push Certificate

Log in to Tencent Cloud Chat Console, click Push > Access Settings to add vendor push certificates, and configure the obtained vendor's AppId, AppKey, AppSecret, and other parameters to the added push certificate.
Vendor Push Platform
Configuring in the IM console





Note:
Specified in-app page link cannot be modified. This configuration is for dispatching event listening for the offline push plugin after a click; direct configuration of in-app page navigation is not allowed.





For receipt configuration, refer to: Message Delivery Statistics Configuration > VIVO

Step 1: Register a Meizu Developer Account

Register a Meizu developer account, see Developer Registration for details.

Step 2: Create an Application

1. Click Console >Flyme Push.

2. After entering the application information, create the application.
Note:
The application package name should be consistent with the plugin application package name.


Step 3: Obtain Application Information

In the application list, click Open Application. Enter the configuration management page to obtain application information.





Step 4: Add Push Certificate

Log in to Tencent Cloud Chat Console, click Push > Access Settings feature bar to add various manufacturer's push certificates, and configure the obtained parameters such as AppId, AppKey, AppSecret to the added push certificate.
Vendor Push Platform
Configuring in the IM console





Note:
Specified in-app page link cannot be modified. This configuration is for dispatching event listening for the offline push plugin after a click; direct configuration of in-app page navigation is not allowed.





For receipt configuration, refer to: Message Delivery Statistics Configuration > Meizu

Step 1. Register an HONOR Developer Account

Register an HONOR Developer Account, for details see Developer Registration.

Step 2: Enter the Management Center Page.





Step 3: Enter the Push Service List

Click Push Service to access the Push Service list page.





Step 4: Create an Application

1. Click Apply for Push Services to enter the application submission page.

2. Select the Application Type "Mobile Application", fill in the Application Package Name and Certificate Fingerprint, agree to the Push Service Agreement and Data Processing Appendix, then click Submit.
Note:
You must add the packaged SHA256 Certificate Fingerprint, which should match the SHA256 Certificate Fingerprint of your own packaging certificate.




Step 5: Obtain Application Information

In the Push Service list, click View to obtain application information.


Step 6: Add Push Certificate

Log in to Tencent Cloud Chat Console, click Push > Access Settings, add vendor push certificates, and configure the obtained vendor's AppID, AppKey, AppSecret, and other parameters to the added push certificate.
Vendor Push Platform
Configuring in the IM console



Note:
Specified in-app page link cannot be modified. This configuration is for dispatching event listening for the offline push plugin after a click; direct configuration of in-app page navigation is not allowed.




Google FCM is currently under development, please stay tuned~~
Before integrating the TIMPush component, you need to first apply for an APNs push certificate from Apple, then upload the push certificate to the IM Console. Afterwards, you can follow the Quick Integration steps to integrate.
There are currently two mainstream types of certificates for Apple, the p12 certificate and the p8 certificate. Each type of certificate has its advantages and disadvantages, and you can choose one of them according to your needs.

Certificate Type
Validity Period and Management
Security
Dynamic Island
P12 Certificate
A P12 certificate is a binary file that contains both a public and a private key, used for certificate-based authentication. It bundles the public key certificate and the private key into one file, with an extension of .p12 or .pfx.
P12 certificates usually have a validity period of one year, after which they need to be regenerated and deployed. Each application requires a separate P12 certificate to handle push notifications.
Certificate: The P12 certificate uses certificate-based authentication, requiring the private key to be stored on the server. This may increase the security risk, as the private key could be accessed by unauthorized users.
Not supported
P8 Certificate
A P8 certificate is an Authorization Key, used for token-based authentication. It is a text file containing a private key, with an extension of .p8.
P8 certificates do not have an expiration date, so you do not need to worry about certificate expiration. Moreover, using a P8 certificate can simplify certificate management, as you can use one P8 certificate to provide push notification services for multiple applications.
P8 certificates use token-based authentication, meaning your server periodically generates a JSON Web Token (JWT) to establish a connection with APNs. This method is more secure, as it does not require storing a private key on the server.
Supports Dynamic Island Push

1. Using a p12 certificate (traditional push certificate)

Step 1: Apply for an APNs certificate

Enable remote push for the app

1. log in to Apple Developer Center website, click Certificates, Identifiers & Profiles or the sidebar's Certificates, IDs & Profiles, enter the Certificates, IDS & Profiles page.

2. click the + next to Identifiers.



3. You can follow the steps below to create a new AppID or add a Push Notification Service to your existing AppID.
Note:
Your App's Bundle ID cannot use the wildcard *, otherwise, the remote push service cannot be used.
4. Check the App IDs box, click Continue to proceed to the next step.



5. Select App, click Continue to proceed to the next step.



6. Configure the Bundle ID and other information, click Continue to proceed to the next step.



7. Check the Push Notifications box to enable the remote push service.




Certificate Generation

1. Select your AppID and choose Configure.



2. In the Apple Push Notification service SSL Certificates window, there are two SSL Certificates for the development environment (Development) and the production environment (Production), as shown below:



3. 
We
first select the Create Certificate for the Development environment, the system will prompt us that we need a Certificate Signing Request (CSR).



4. On a Mac, open Keychain Access tool, in the menu select Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority (Keychain Access - Certificate Assistant - Request a Certificate From a Certificate Authority).



5. Enter your email address, Common Name (your name or company name), select Save to disk, click continue, the system will generate a *.certSigningRequest file.



6. Go back to the page on the Apple Developer website mentioned in Step 3, click Choose File to upload the generated *.certSigningRequest file.



7. Click Continue to generate the push certificate.



8. click Download to download the Development SSL Certificate to your local environment.



9. Repeat steps 1 - 8 above to download the Production SSL Certificate for the production environment to your local machine.
Note
The certificate for the production environment is actually a combined certificate of Development (Sandbox) + Production, and it can be used as a certificate for both the development and production environments.






10. Double-click the downloaded SSL Certificate for the development and production environments. The system will import it into the keychain.
11. Open the Keychain App, go to log in to > My Certificates, right-click to export the newly created Apple Development IOS Push Services and Apple Push Services for the development and production environments as p12 files respectively.


Note
Set a password when saving the .p12 file.

Step 2: Upload the certificate to the console

1. Log in to the Chat Console.
2. Click Plugin Service-Push-Access Settings to enter the access settings page



3. Click Add Certificate at the bottom of iOS in Vendor Configuration.
4. Select the certificate type, upload the iOS Certificate (.p12), set the certificate password, and click Confirm.



Note:
We recommend naming the uploaded certificate in English (special characters such as brackets are not allowed).
You need to set a password for the uploaded certificate. Without a password, push notifications cannot be received.
For an app published on App Store, the environment of the certificate must be the production environment. Otherwise, push notifications cannot be received.
The uploaded .p12 certificate must be your own authentic and valid certificate.
5. After the pending certificate information is generated, record the certificate's ID.




2. Using a p8 certificate (supports Dynamic Island push notifications)

p8 Certificate: A p8 certificate does not have an expiration date, so you don't have to worry about the certificate expiring. Moreover, using a p8 certificate can simplify certificate management, as you can use a single p8 certificate to provide push notification services for multiple applications. In addition, p8 certificates support Dynamic Island push notifications.

Step 1: Apply for an APNs certificate

To create a p8 certificate file, first log in to Apple Developer Center.

1. Enter Certificates, Identifiers & Profiles: In the top right corner of the page, click Account, then select Certificates, Identifiers & Profiles from the dropdown menu.
2. To create a new App ID: in the left-hand menu, click Identifiers, then click the + on the right to create a new App ID. Fill in the relevant information and click Continue.
3. To create a new key: in the left-hand menu, click Keys, then click the + on the right to create a new key. Enter the name of the key, then check Apple Push Notifications service (APNs) and click Continue.

Confirm and generate the key: On the confirmation page, verify your key information, then click Register. Next, you'll see a page prompting you to download the key. Click Download and save the generated .p8 file to your computer.
Note:
The p8 certificate can only be downloaded once; please save it properly.
Please safeguard the downloaded p8 file, as you will not be able to download it again. You can use this p8 certificate to configure your iOS applications to receive push notifications.

Step 2: Upload the p8 certificate to the IM console

1. Log in to the Chat Console.
2. Click Plugin Service-Push-Access Settings to enter the access settings page



3. Click Add Certificate at the bottom of iOS in Vendor Configuration.
4. Select the .p8 certificate



Note:
Key ID: This is the unique identifier for your APNs Auth Key. When you create a new APNs Auth Key in the Apple Developer Center, a Key ID will be generated for you. You can find it in the "Certificates, Identifiers & Profiles" section under "Keys".
Team ID: This is the unique identifier for your developer account. You can find it on the account details page of the Apple Developer Center. Click "Membership" in the upper right corner, and you can find your Team ID in the "Membership Details" section.
Bundle ID: This is the unique identifier for your application, also known as the app ID. You can find it in the "Certificates, Identifiers & Profiles" section of the Apple Developer Center. Select "Identifiers", then find the corresponding Bundle ID in your list of applications.