> For the complete documentation index, see [llms.txt](https://aatkit.gitbook.io/ios-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aatkit.gitbook.io/ios-integration/advanced/shake-debug.md).

# Shake Debug

By default, AATKit will display a popup box with information about AATKit’s version and the currently visible ads whenever the user has heavily shaken the device. You can disable or enable this behaviour after initializing AATKit.

{% hint style="info" %}
Debug screen will not be presented on top of fullscreen ads. Instead, once the ad is closed, the debug screen will have information about last presented fullscreen ad.
{% endhint %}

We encourage you to keep the shake debug enabled to track down possible bad-quality ads.

### Enable Shake Debug

{% tabs %}
{% tab title="Swift" %}

```swift
// [IMPORTANT] AATKit must be initialised first
let configuration = AATConfiguration()
AATSDK.initAATKit(with: configuration)
AATSDK.enableDebugScreen()
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
// [IMPORTANT] AATKit must be initialised first
AATConfiguration *configuration = [[AATConfiguration alloc] init];
[AATSDK initAATKitWith:configuration];
[AATSDK enableDebugScreen];
```

{% endtab %}
{% endtabs %}

### Disable Shake Debug

{% tabs %}
{% tab title="Swift" %}

```swift
// [IMPORTANT] AATKit must be initialised first
let configuration = AATConfiguration()
AATSDK.initAATKit(with: configuration)
AATSDK.disableDebugScreen()
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
// [IMPORTANT] AATKit must be initialised first
AATConfiguration *configuration = [[AATConfiguration alloc] init];
[AATSDK initAATKitWith:configuration];
[AATSDK disableDebugScreen];
```

{% endtab %}
{% endtabs %}

### Customize Shake Debug

You can control which data should be displayed in the shake debug screen by the following:

{% tabs %}
{% tab title="Swift" %}

```swift
let debugScreenConfiguration = AATDebugScreenConfiguration(appLogo: <LOGO_IMAGE>,
                                                           title: <TITLE>,
                                                           showBundleId: true,
                                                           showTestMode: true,
                                                           showLoadedAndLoadingAds: true,
                                                           showDisabledNetworks: true,
                                                           showRemovedNetworkSDKs: true,
                                                           showDeviceType: true,
                                                           showExtraSDKs: true,
                                                           showConsent: true,
                                                           showIDFA: true)
debugScreenConfiguration.shareEmail = "<YOUR_SUPPORT_EMAIL_ADDRESS>" // Optional
AATSDK.configureDebugScreen(configuration: debugScreenConfiguration)
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
AATDebugScreenConfiguration *debugScreenConfiguration = [[AATDebugScreenConfiguration alloc] initWithAppLogo:<LOGO_IMAGE>
                                                                                                    title:<TITLE>
                                                                                             showBundleId:YES
                                                                                             showTestMode:YES
                                                                                  showLoadedAndLoadingAds:YES
                                                                                     showDisabledNetworks:YES
                                                                                   showRemovedNetworkSDKs:YES
                                                                                           showDeviceType:YES
                                                                                            showExtraSDKs:YES
                                                                                              showConsent:YES
                                                                                                 showIDFA:YES];
debugScreenConfiguration.shareEmail = @"<YOUR_SUPPORT_EMAIL_ADDRESS>"; // Optional
[AATSDK configureDebugScreenWithConfiguration:debugScreenConfiguration];
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The `shareEmail` field is the one used in the shake debug screen for sharing current session's debug info.
{% endhint %}

### Retrieve Debug Info

You can retrieve the debug info that will be displayed on the shake debug screen by using the following API:

{% tabs %}
{% tab title="Swift" %}

```swift
// Retrieve debug info as an AATDebugInfo instance
let debugInfo = AATSDK.getDebugInfoObject()
// Retrieve debug info as a string
let debugInfoString = AATSDK.getDebugInfo()
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
// Retrieve debug info as an AATDebugInfo instance
AATDebugInfo *debugInfo = [AATSDK getDebugInfoObject];
// Retrieve debug info as a string
NSString *debugInfoString = [AATSDK getDebugInfo];
```

{% endtab %}
{% endtabs %}
