# iOS SKAdNetwork support

> Support Apple’s iOS 14 privacy requirements, including SKAdNetwork integration and guidance on handling user consent.

This guide represents Unity's current proposed changes to Unity Ads auction logic for our programmatic partners. We encourage you to revisit this documentation periodically to ensure that you have the most up-to-date guidance.

> **Note:**
>
> All fields and names are case-sensitive.

## Bid Request Change

### BidRequest.imp.ext.skadn##impression-ext

If a DSP has at least one `SKAdNetworkItem` in the publisher app's `Info.plist`, Unity will include this object in the bid request. This provides the information required to create a signature.

| **Field**    | **Type**     | **Description**                                                                                                       | **Example**                          |
| ------------ | ------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `sourceapp`  | string       | Publisher app ID in Apple's App Store. Should match app.bundle value in the bid request.                              | `"sourceapp":"123456789"`            |
| `skadnetids` | string array | A lowercase list of DSP-specific `SKAdNetworkItem` entries that appear in the publisher app's Info.plist\_ file.      | `"skadnetids": ["dsp1.skadnetwork"]` |
| `versions`   | string array | Array of strings containing the supported skadnetwork versions. Dependent on both the OS version and the SDK version. | `"versions":["2.0","2.1","3.0"]`     |

### BidRequest.device.ext.atts##device-ext

Unity will include the status for app tracking authorization in the `BidRequest.device.ext.atts` field. For more information about this field, refer to [Apple's API documentation.](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus)

| **Field** | **Type** | **Description**                                                                                                                                  | **Example** |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| `atts`    | int      | The status value for app tracking authorization. Possible values are:- `0` = not determined
- `1` = restricted
- `2` = denied
- `3` = authorized | `"atts":2`  |

## Bid Response Change

### BidResponse.seatbid.bid.ext.skadn##seatbid-ext

If a bid request includes a `BidRequest.imp.ext.skadn`, a DSP can send a `BidResponse.seatbid.bid.ext.skadn` object in response. If present, Unity will use the signature of this object for attribution. For more information, refer to [Apple's API documentation.](https://developer.apple.com/documentation/storekit/skadnetwork)

| **Field**          | **Type**     | **Description**                                                                                                                                                                                                                                                                                                  | **Example**                                                                                                                                            |
| ------------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `signature`        | string       | `SKAdNetwork` signature specified by Apple.                                                                                                                                                                                                                                                                      | `"signature": "WOBQQIRTnAcfYzF..."`                                                                                                                    |
| `network`          | string       | Ad network identifier used in signature. This must match one of the items in the `skadnetids` array in the request.                                                                                                                                                                                              | `"network":"5HUO92BLLQ.skadnetwork"`                                                                                                                   |
| `version`          | string       | Version of specified SKAdNetwork.                                                                                                                                                                                                                                                                                | `"version":"2.0"`                                                                                                                                      |
| `campaign`         | string       | Campaign ID compatible with Apple's spec. As of version 2.0, this must be an integer between `1` and `100`, expressed as a string.                                                                                                                                                                               | `"campaign":"83"`                                                                                                                                      |
| `itunesitem`       | string       | Advertiser app ID in Apple's App Store. This must match bid.bundle in the bid response.                                                                                                                                                                                                                          | `"itunesitem":"987654321"`                                                                                                                             |
| `nonce`            | string       | An ID that is unique to each ad response.                                                                                                                                                                                                                                                                        | `"nonce":"385c9n44-a9ik-28fd-8247-gjk2efoa56a9"`                                                                                                       |
| `sourceapp`        | string       | ID of publisher app in Apple's App Store. This must match `imp.ext.skadn.sourceapp` in the bid request.                                                                                                                                                                                                          | `"sourceapp":"123456789"`                                                                                                                              |
| `timestamp`        | string       | Unix time in milliseconds at the time the signature was generated.                                                                                                                                                                                                                                               | `"timestamp": "1225091839"`                                                                                                                            |
| `fidelities`       | object array | Supports multiple fidelity types introduced in SKAdNetwork v2.2.                                                                                                                                                                                                                                                 | ```text
"fidelities": 
[ { 
  "fidelity": 0, 
  "signature": 
  "MEQCIEQlmZRNfYzK…", 
  "nonce": "473b1a16…", 
  "timestamp": "1603246928149" 
} ]
``` |
| `sourceidentifier` | string       | A four-digit integer that ad networks define to represent the ad campaign. Used in SKAdNetwork 4.0 and later, and replaces the `BidResponse.imp.ext.skad.` field.DSPs must generate signatures in versions 4.0 and later by using the Source Identifier. For versions 3.0 and earlier, continue to use campaign. | `"sourceidentifier": "1234"`                                                                                                                           |

### bid.ext.skadn.fidelities##bid-ext

If a bid request includes a `BidRequest.imp.ext.skadn`, a DSP can send a `BidResponse.seatbid.bid.ext.skadn` object in response. If present, Unity will use the signature of this object for attribution. For more information, refer to [Apple's API documentation](https://developer.apple.com/documentation/storekit/skadnetwork).

| **Field**   | **Type** | **Description**                                                                                                                                                                                               | **Example**                                     |
| ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| `fidelity`  | int      | The fidelity-type of the attribution to track.                                                                                                                                                                | `"fidelity": 0`                                 |
| `nonce`     | string   | An ID that is unique to each ad response. Refer to Apple's documentation for the proper [UUID format](https://developer.apple.com/documentation/storekit/skstoreproductparameteradnetworknonce) requirements. | `"nonce":"385c9n44-a9ik-28fd-8247-gjk2efoa56a9` |
| `timestamp` | string   | Unix time in milliseconds at the time the signature was generated.                                                                                                                                            | `"timestamp": "1225091839"`                     |
| `signature` | string   | SKAdNetwork signature specified by Apple.                                                                                                                                                                     | `"signature": "MEQCIEQlmZRNfYzK…"`              |

## Device IDs##device-i-ds

> **Note:**
>
> Unity will pass IDFA where present. Where IDFA is not present, IDFV will be passed.

| **Field**        | **Type** | **Description**                                                                                                                                         | **Example**                            |
| ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| `Device.ifa`     | string   | Preferred device advertising identifier (IDFA). It has a value of `00000000-0000-0000-0000-000000000000` when permission to track has not been granted. | `ABC123AB-1234-5678-A1B2-123ABCBCD789` |
| `Device.ext.ifv` | string   | IDFV of the device in the publisher. This is a unique identifier across apps from the same vendor.                                                      | `ABCDEFGH-ABCD-1234-1234-ABCDEFGHABCD` |
