> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-unity-sdk-initialization-split.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Why Does the "BadDeviceToken" Error Occur?

> Understand and fix the BadDeviceToken error in iOS push notifications caused by mismatches between your build environment and MoEngage dashboard.

## Problem

When sending push notifications in iOS to a reachable user, the error "BadDeviceToken" appears.

## Explanation

This error occurs in the following scenarios:

* Push notifications are sent from the Live dashboard while the build is in the Debug Environment.
* Push notifications are sent from the Test dashboard while the build is in the Release Environment.
* You attempt to test push notifications from any dashboard while a Debug Environment build is archived using Production Apple Certificates.
* You attempt to test push notifications from any dashboard while a Release Environment build is archived using Development Apple Certificates.

## Solution

To avoid this error, ensure the following configurations:

* *Debug configuration*. Use Developer Certificates and the Test dashboard in MoEngage.
* *Release configuration*. Use Production or AdHoc Certificates and the Live dashboard in MoEngage.
