logo
In-app Chat
SDK Error Codes
Powered Byspreading
On this page

Cross-application offline push

Overview

This document can be a reference if you want to use a ZEGOCLOUD AppID to implement offline push communication between two APPs. This function is commonly used between teacher and student APPs, the teacher sends messages to the student and the student can receive offline push notifications.

Prerequisites

  • Before implementing cross-application offline push interoperability, please make sure both projects have integrated ZIM SDK and ZPNs SDK and have implemented offline push, please refer to Implement offline push notification for details.

Usage Steps

  1. Refer to Integrate APNs to get 2 offline push certificates for each of the 2 projects.
  2. Refer to How to configure Offline Push Certificates to configure the 2 push certificates obtained above on the ZEGOCLOUD console.
  1. Call the setPushConfig interface and fill in the corresponding configured appType for the current project.
Warning

This step needs to be completed before calling the registerAPNs interface to register with APNs.

Untitled
ZPNsConfig *zpnsConfig = [[ZPNsConfig alloc] init];
// appType is the Certificate index.
// If the Certificate index is index1, then it should be appType = 1.
zpnsConfig.appType = 1;
[[ZPNs shared] setPushConfig:zpnsConfig];
1
Copied!

After completing the above configuration, cross-application offline push interoperability can be implemented.

Previous

Get payload field

Next

Implement silent push notifications