<br />

While you can use ad inspector to inspect ad behavior during development,
testing, and troubleshooting, the tool might increase memory usage when
enabled. You might want to disable ad inspector during performance profiling and
memory checking. This feature makes sure that ad inspector doesn't run and
interfere with your app's performance measurements.

Disabling ad inspector prevents the tool from increasing memory usage or
launching through gestures, the debug menu, or method calls. You can disable
ad inspector while performance testing in test mode. In production, ad inspector
is always disabled and doesn't impact your app's performance.

This guide covers disabling ad inspector and verifying the disablement.

## Prerequisites

Before you continue, complete the following:

- [Set up Google Mobile Ads SDK](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/quick-start.md.txt).
- Use Google Mobile Ads SDK version 13.8.0 or higher.

## Disable with build types

To keep ad inspector available in debug builds while disabling the tool in
profiling builds, manage the build configuration setting by

defining your build settings and updating your `Info.plist` file.
Complete the following steps:

1. In the Xcode navigation menu, select your app from **Target**.
2. In the menu bar, click **Build Settings** and **All**.
3. Click add.
4. From the drop-down menu, select **Add User-Defined Setting** . A **User Defined** box appears.
5. In the box, add a setting name, for example, `DISABLE_AD_INSPECTOR`.
6. Press **ENTER** or **RETURN**. You see a row with your setting name.
7. Set your debug and release IDs:
   1. Expand your setting row. You see the rows **Debug** and **Release**.
   2. Expand the rows and select the following:
      - **Debug** : **Yes**
      - **Release** : **No**
8. In your `Info.plist` file, add the `GADDisableAdInspector` key with the value as the setting name you created.

If successful, your `Info.plist` file pulls your test ad unit ID when you select
**Run** for debug builds, and your ad unit ID after you select **Archive**
for release builds.

## Verify the disablement

When you attempt to open ad inspector while it's disabled, you see the following
error message in your log console:

    Ad inspector is disabled. Remove GADDisableAdInspector from the plist file to use ad inspector.