---
description: Disable ad networks at runtime
---

# Disabling Ad Networks

{% hint style="info" %}
Disabling ad networks at compile time using [Cocoapods](../../start/setup/minimum-ios-version#add-or-remove-ad-network-sdks) or [Swift Package Manager](../../start/setup/swift-package-manager#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 %}

### 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 %}
