> 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/disabling-ad-networks.md).

# Disabling Ad Networks

{% hint style="info" %}
Disabling ad networks at compile time using [Cocoapods](/ios-integration/start/setup/minimum-ios-version.md#add-or-remove-ad-network-sdks) or [Swift Package Manager](/ios-integration/start/setup/swift-package-manager.md#integrate-aatkit-with-specific-ad-network-sdks) will always override runtime settings (since the ad network’s SDK won’t be present physically).
{% endhint %}

### Disable Ad Network <a href="#disable-ad-network" id="disable-ad-network"></a>

To disable ad networks at runtime, call the following method passing the [AATAdNetwork](https://ios-sdk.aatkit.com/references/documentation/aatkit/aatadnetwork) to disable:

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

```swift
AATSDK.setNetworkEnabled(network: <AATAdNetwork>, enabled: false)
```

{% endtab %}

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

```objectivec
[AATSDK setNetworkEnabledWithNetwork:<AATAdNetwork> enabled:NO];
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Please note that disabling of networks does not work for partners accessed via GraviteRTB bidding, like ADMOBBIDDING, METABIDDING, MOLOCOBIDDING. If you intend to block those DSPs please contact your account manager or <support@gravite.net>
{% endhint %}

### Enable Ad Network <a href="#enable-ad-network" id="enable-ad-network"></a>

To enable an ad network that has been disabled earlier, call the following method passing the [AATAdNetwork](https://ios-sdk.aatkit.com/references/documentation/aatkit/aatadnetwork) to enable:

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

```swift
AATSDK.setNetworkEnabled(network: <AATAdNetwork>, enabled: true)
```

{% endtab %}

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

```objectivec
[AATSDK setNetworkEnabledWithNetwork:<AATAdNetwork> enabled:YES];
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aatkit.gitbook.io/ios-integration/advanced/disabling-ad-networks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
