> 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/start/consent/vendor-consent.md).

# Vendor Consent

Handle consent using AATKit vendor consent

### Introduction

You should consider using AATKit’s Vendor Consent, in case you want to utilize a CMP that AATKit has not yet adapted with its ManagedConsent. In that case, you might want to pass individual consents (coming from your CMP) to specific non-IAB compliant ad networks/vendors.

To use it, you should pass an [AATVendorConsent](https://docs.gravite.net/aatkit/ios/docs/documentation/aatkit/aatvendorconsent) instance to the [AATConfiguration](https://docs.gravite.net/aatkit/ios/docs/documentation/aatkit/aatconfiguration) object while initializing AATKit. The vendor consent instance should be initialized with an object implementing [AATVendorConsentDelegate](https://docs.gravite.net/aatkit/ios/docs/documentation/aatkit/aatvendorconsentdelegate).

Vendor Consent will also automatically read the IAB consent string stored (by third-party CMP) in NSUserDefaults (if available). This means that the value returned by `getConsentForAddApptr` will only be used if there is no IAB TCF2.0 consent stored.

### Usage

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

```swift
func configureAATKit() {
    let configuration = AATConfiguration()
    ...
    let consent = AATVendorConsent(delegate: self)
    configuration.consent = consent
    ...
    AATSDK.initAATKit(with: configuration)
}
// MARK: AATVendorConsentDelegate
func getConsentForNetwork(_ network: AATAdNetwork) -> NonIABConsent {
    switch network {
        case .INMOBI:
            return .obtained
        case .ADMOB:
            return .withheld
        case .APPLOVIN:
            return .unknown
        ...
    }
}

func getConsentForAddapptr() -> NonIABConsent {
    return .obtained
}
```

{% endtab %}

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

```objectivec
- (void)configureAATKit {
    AATConfiguration* configuration = [[AATConfiguration alloc] init];
    ...
    AATVendorConsent *consent = [[AATVendorConsent alloc] initWithDelegate:self];
    configuration.consent = consent;
    ...
    [AATSDK initAATKitWith:configuration];
}

#pragma mark - AATVendorConsentDelegate
- (enum NonIABConsent)getConsentForAddapptr {
    return NonIABConsentObtained;
}

- (enum NonIABConsent)getConsentForNetwork:(enum AATAdNetwork)network {
    switch (network) {
        case AATAdNetworkINMOBI:
            return NonIABConsentObtained;
            break;
        case AATAdNetworkADMOB:
            return NonIABConsentWithheld;
            break;
        case AATAdNetworkAPPLOVIN:
            return NonIABConsentUnknown;
            break;
        ...
    }
}
```

{% endtab %}
{% endtabs %}
