The following illustration visualizes how Crosslight push notification service works. In general, the push notification service sent a silent notification to each registered device which will then trigger the data sync in the app.
To send a push notification that triggers synchronization, you can use Crosslight PushServiceManager.QueueSyncNotificationmethod such as follows.
When you send this push notification, you can handle the notification at app level in AppService as follows.
The above code example also shows how you can reuse the same sync logic that you might already implement in the OnSync method. The OnSync method is automatically called by the operating system when background sync is enabled. For more information about background sync, see Working with Background Sync Service.
Enabling Push Notification for Data Sync in iOS
To enable data sync through push notification in iOS, you need to set the info.plist as follows.