Skip to main content
All CollectionsGetting startedTroubleshooting
How can I display a stable debug ID in my app?
How can I display a stable debug ID in my app?

The Installation ID is an ID generated by Batch for all your installs. You can display it in your app to simplify the debug process.

Baptiste avatar
Written by Baptiste
Updated over 7 months ago

The installation ID is an anonymous ID generated by Batch the first time users open your app or your website, whether they opt-in for push notifications or not. That ID changes each time users reinstall your app.

You can use that ID in the debug tool (Dashboard settings → Debug) to find your own install, see the data Batch has on it and send test notifications to your device.

Your end-users can also send it to you so you can understand why they are not receiving push notifications or not seeing an In-App message.

You can also store the installation ID on your end and reuse it later to target specific installs using the Transactional API.

💡 Note: From version 1.18 of our SDK, Batch implements the "Find my installation" feature. Batch will copy the Installation ID to the clipboard when the application appears in the foreground 4 times within 20 seconds. Read more here: iOS / Android

1. Retrieving the installation ID

You can retrieve the installation ID by calling the following methods:

iOS

Objective-C

[BatchUser installationID];

Swift

BatchUser.installationID()

Android

Batch.User.getInstallationID();

Cordova

batch.user.getInstallationID(function(installid) {
  console.log(installid);
});

Web

window.batchSDK(api => api.getInstallationID().then(console.log))

2. Displaying the installation ID

That installation ID can safely be exposed to your end users. You can:

  • Insert it in a diagnostic email automatically generated when users report an issue from the app.

  • Hide it in an easter egg (e.g. display it after 10 taps on the specific button, etc).

  • Or simply display it in your app settings or on your website (web push only).

👉 Need more help?

If you have any questions, don't hesitate to ping us at support@batch.com, or directly on the live chat!


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.

Did this answer your question?