Batch relies on Apple (APNS: Apple Push Notification Service) and Google (FCM: Firebase Cloud Messaging) push services to send push notifications on iOS and Android.
Understanding How Batch's SDK Works
Batch SDK must be integrated into your app. Your integration is attached to an app on Batch's side thanks to the "API key" you specified in your code when you completed the integration.
On the first app open, the SDK will start and Batch will register a new install. For every new install, Batch generates an anonymous "installation ID".
All the data collected from the app until users uninstall it will be attached to that "installation ID":
Collecting a Push Token
In order to send a push notification to a device, Batch needs to collect a "token". That token is anonymous and delivered by Apple and Google push services:
Here is how Batch collects a new token:
The app requests and receives a token from APNS/FCM. On iOS, this can happen when the app starts or when users accept push notifications, depending on the background refresh support (see more here).
Batch SDK collects that token and sends it to Batch servers.
The token is refreshed on every app start. This makes sure Batch always have a valid token to push your user.
Sending a Push Notification
In order to send a push notification to several devices, Batch servers provide the list of tokens that need to be pushed to Apple / Google push notification service. Batch also provides a payload, containing all the data the app needs to display properly the notification (message, image, deeplink, etc).
Then, Apple/Google push notification service handle the delivery to the device. They provide feedback on errors or issues (e.g. invalid token, push certificate issues, etc). Batch cleans automatically your userbase based on these feedback. Batch SDK also sends feedback to Batch Servers when users click a notification.