iOS > Custom data

Testing your integration

Batch provides a simple debug tool that allows you to test your custom data integration (⚙ Settings → Debug). It shows all the data available for a specific user ID:

  • Token: Find the token of a specific device.
  • Custom user ID: Check if your custom user ID implementation is working correctly.
  • Native attributes: See the installation date, last session date, country and more information on a specific user / install.
  • Custom data: See if your app is tagged properly and if custom attributes/events are sent to Batch.

Debug tool

Finding your ID

Installation ID

You can find the Installation ID of a device by calling:

[BatchUser installationID];

You can either log this to the debug logs, or display it in a debug menu directly in your app. It can safely be exposed to your end users, who can then give it back to you if they are experiencing push trouble with their app.


You can use The Identifiers app to find your Advertising Identifier (IDFA). Just install the app on your device, tap on the share button and copy the Advertising identifier.

Understanding the results

The results displayed in the debug tool are updated in real time. There are five different pieces of information shown for a single ID:

  • Basic information (token, install ID, custom user ID, etc).
  • Native attributes prefixed with b. (b.attribute_name).
  • Custom attributes prefixed with c. (c.attribute_name).
  • Tags prefixed with t. (t.tag_name).
  • Events prefixed with e.(e.event_name).

Here are some details on the native attributes you will find in the results:

  • b.device_brand: Brand of your user's device.
  • b.device_type: Model of your user's device. See here if you need more information on a specific iOS/Android device model.
  • b.carrier_code: Your user's carrier. The code provided by Batch is a combination of the Mobile country code (MCC) and the Mobile network code (MNC). The full list of MCC and MNC codes is available here.
  • b.state: First letter of the Smart Segment of your user (E.g. Engaged → E, New Promising → Np).
  • b.install_date: Install date of the app (UTC/GMT).
  • b.last_push_date: Date of the last sent notification (UTC/GMT).
  • b.last_visit_date: Date of the last session (UTC/GMT).