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
- Refer to Integrate APNs to get 2 offline push certificates for each of the 2 projects.
- Refer to How to configure Offline Push Certificates to configure the 2 push certificates obtained above on the ZEGOCLOUD console.
- 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
After completing the above configuration, cross-application offline push interoperability can be implemented.