<!--
{
  "availability" : [
    "iOS: 14.3 -",
    "iPadOS: 14.3 -",
    "macCatalyst: 14.3 -",
    "macOS: 11.1 -",
    "visionOS: 1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AdServices",
  "identifier" : "/documentation/AdServices",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "AdServices"
    ],
    "preciseIdentifier" : "AdServices"
  },
  "title" : "AdServices"
}
-->

# AdServices

Attribute app-download campaigns that originate from the App Store on iOS devices.

## Overview

The Apple Ads Attribution API is a solution that combines the `AdServices` framework and a RESTful API for server-side communication with Apple’s attribution
server. The API retrieves Apple Ads attribution data from Apple Ads campaigns. You can measure attribution data using specific Apple Ads campaign metadata against the performance of Apple Ads campaigns.

The following diagram illustrates using the AdServices framework in combination with a RESTful endpoint to retrieve
attribution data:

![A diagram showing the sequence of interaction between the AdServices framework and RESTful API.](images/com.apple.AdServices/ad_services-1@2x.png)

- In step 1, request a token from the `AdServices` framework.
- In step 2, the `AdServices` framework generates a token.
- In step 3, use the token in a RESTful API request to retrieve an attribution record from Apple’s attribution server. For more detail, see [`attributionToken()`](/documentation/AdServices/AAAttribution/attributionToken()).
- In step 4, the attribution record that returns has key-value pairs that correspond
  to your campaigns in the Apple Ads Campaign Management API. For more detail,
  see [`Attribution payload descriptions`](/documentation/AdServices/AAAttribution/attributionToken()#Attribution-payload-descriptions).

## Topics

### Essentials

[Changelog](/documentation/AdServices/Changelog)

A log of Ad Services framework updates.

### Tokens

[`AAAttribution`](/documentation/AdServices/AAAttribution)

The parent class that the framework uses to request a token.

### Errors

[`AAAttributionError`](/documentation/AdServices/AAAttributionError)

The error code that the parent class issues.

[`AAAttributionErrorDomain`](/documentation/AdServices/AAAttributionErrorDomain)

The framework attribution error domain.

[`AAAttributionError.Code`](/documentation/AdServices/AAAttributionError/Code)

The error code that the parent class issues.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)