[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M782NBVRXK6M75G7PSGRFMYQ":3,"skill-same:01M782NBVRXK6M75G7PSGRFMYQ":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M782NBVRXK6M75G7PSGRFMYQ","adattributionkit",null,"Measure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_dpearson2699_swift-ios-skills_adattributionkit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: adattributionkit\ndescription: \"Measure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.\"\n---\n\n# AdAttributionKit\n\nPrivacy-preserving ad attribution for iOS 17.4+ \u002F Swift 6.3. AdAttributionKit\nlets ad networks measure conversions (installs and re-engagements) without\nexposing user-level data. It supports the App Store and alternative\nmarketplaces, and interoperates with SKAdNetwork.\n\nThree roles exist in the attribution flow: the **ad network** (signs\nimpressions, receives postbacks), the **publisher app** (displays ads), and the\n**advertised app** (the app being promoted).\n\n## Contents\n\n- [Overview and Privacy Model](#overview-and-privacy-model)\n- [Publisher App Setup](#publisher-app-setup)\n- [Advertiser App Setup](#advertiser-app-setup)\n- [Impressions](#impressions)\n- [Postbacks](#postbacks)\n- [Conversion Values](#conversion-values)\n- [Re-engagement](#re-engagement)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n## Overview and Privacy Model\n\nAdAttributionKit preserves user privacy through several mechanisms:\n\n- **Crowd anonymity tiers** -- the device limits postback data granularity based\n  on the crowd size associated with the ad, ranging from Tier 0 (minimal data)\n  to Tier 3 (most data including publisher ID and country code).\n- **Time-delayed postbacks** -- postbacks are sent 24-48 hours after conversion\n  window close (first window) or 24-144 hours (second\u002Fthird windows).\n- **No user-level identifiers** -- postbacks contain aggregate source\n  identifiers and conversion values, not device or user IDs.\n- **Hierarchical source identifiers** -- 2, 3, or 4-digit source IDs where the\n  number of digits returned depends on the crowd anonymity tier.\n\nIn migration and interoperability reviews, explicitly state that the system\nevaluates AdAttributionKit and SKAdNetwork impressions together, only one\nimpression wins per conversion, click-through beats view-through, and recency\nbreaks ties within click-through impressions before falling back to the most\nrecent view-through impression.\n\n## Publisher App Setup\n\nA publisher app displays ads from registered ad networks. Add each ad network's\nID to the app's Info.plist so its impressions qualify for install validation.\n\n### Add ad network identifiers\n\n```xml\n\u003Ckey>AdNetworkIdentifiers\u003C\u002Fkey>\n\u003Carray>\n    \u003Cstring>example123.adattributionkit\u003C\u002Fstring>\n    \u003Cstring>another456.adattributionkit\u003C\u002Fstring>\n\u003C\u002Farray>\n```\n\nAd network IDs must be lowercase. SKAdNetwork IDs (ending in `.skadnetwork`)\nare also accepted -- the frameworks share IDs.\n\n### Display a UIEventAttributionView\n\nFor click-through custom-rendered ads, place one `UIEventAttributionView` over\neach tappable ad\u002Fcontrol. It must cover the tappable area and stay above views\nthat would intercept touches before `handleTap()` succeeds.\n\n```swift\nimport UIKit\n\nlet attributionView = UIEventAttributionView()\nattributionView.frame = adContentView.bounds\nattributionView.isUserInteractionEnabled = true\nadContentView.addSubview(attributionView)\n```\n\n## Advertiser App Setup\n\nThe advertised app is the app someone installs or re-engages with after seeing\nan ad. It must call a conversion value update at least once to begin the\npostback conversion window.\n\n### Opt in to receive winning postback copies\n\nAdd `AttributionCopyEndpoint` under the top-level `AdAttributionKit` Info.plist\ndictionary so the device sends a copy of the winning postback to your server:\n\n```xml\n\u003Ckey>AdAttributionKit\u003C\u002Fkey>\n\u003Cdict>\n    \u003Ckey>AttributionCopyEndpoint\u003C\u002Fkey>\n    \u003Cstring>https:\u002F\u002Fexample.com\u003C\u002Fstring>\n\u003C\u002Fdict>\n```\n\nThe system derives the well-known endpoint from the registrable domain in the\nURL, ignoring subdomains:\n\n```\nhttps:\u002F\u002Fexample.com\u002F.well-known\u002Fappattribution\u002Freport-attribution\u002F\n```\n\nConfigure your server to accept HTTPS POST requests at that path. The domain\nmust have a valid SSL certificate.\n\n### Opt in for re-engagement postback copies\n\nAdd a second key in the same `AdAttributionKit` dictionary to also receive\ncopies of winning re-engagement postbacks:\n\n```xml\n\u003Ckey>AdAttributionKit\u003C\u002Fkey>\n\u003Cdict>\n    \u003Ckey>AttributionCopyEndpoint\u003C\u002Fkey>\n    \u003Cstring>https:\u002F\u002Fexample.com\u003C\u002Fstring>\n    \u003Ckey>OptInForReengagementPostbackCopies\u003C\u002Fkey>\n    \u003Ctrue\u002F>\n\u003C\u002Fdict>\n```\n\n### Update conversion value on first launch\n\nCall a conversion value update as early as possible after first launch to begin\nthe conversion window:\n\n```swift\nimport AdAttributionKit\n\nfunc applicationDidFinishLaunching() async {\n    do {\n        try await Postback.updateConversionValue(0, lockPostback: false)\n    } catch {\n        print(\"Failed to set initial conversion value: \\(error)\")\n    }\n}\n```\n\n## Impressions\n\nAd networks create signed impressions using JWS (JSON Web Signature). The\npublisher app uses `AppImpression` to register and handle those impressions.\n\n### Create an impression from a JWS\n\n```swift\nimport AdAttributionKit\n\nlet impression = try await AppImpression(compactJWS: signedJWSString)\n```\n\nThe JWS contains the ad network ID, advertised item ID, publisher item ID,\nsource identifier, timestamp, and optional re-engagement eligibility flag. See\n[references\u002Fadattributionkit-patterns.md](references\u002Fadattributionkit-patterns.md)\nfor JWS generation details.\n\n### Check device support\n\n```swift\nguard AppImpression.isSupported else {\n    \u002F\u002F Fall back to alternative ad display\n    return\n}\n```\n\n### View-through impressions\n\nRecord a view impression when the ad content has been displayed and dismissed:\n\n```swift\nfunc handleAdViewed(impression: AppImpression) async {\n    do {\n        try await impression.handleView()\n    } catch {\n        print(\"Failed to record view-through impression: \\(error)\")\n    }\n}\n```\n\nFor long-lived ad views, use `beginView()` and `endView()` to track view\nduration:\n\n```swift\ntry await impression.beginView()\n\u002F\u002F ... ad remains visible ...\ntry await impression.endView()\n```\n\n### Click-through impressions\n\nRespond to ad taps by calling `handleTap()` within 15 minutes of creating the\n`AppImpression`; otherwise request a fresh impression. If the advertised app is\nnot installed, the system opens its App Store or marketplace page. If installed,\nthe system launches it directly.\n\n```swift\nfunc handleAdTapped(impression: AppImpression) async {\n    do {\n        try await impression.handleTap()\n    } catch {\n        print(\"Failed to record click-through impression: \\(error)\")\n    }\n}\n```\n\nA `UIEventAttributionView` must overlay the ad for `handleTap()` to succeed.\n\n### StoreKit-rendered ads\n\nPass the impression to StoreKit overlay or product view controller APIs. StoreKit\nautomatically records view-through impressions after 2 seconds of display and\nclick-through impressions on tap.\n\n```swift\nimport StoreKit\n\nlet config = SKOverlay.AppConfiguration(appIdentifier: \"1234567890\",\n                                         position: .bottom)\nconfig.appImpression = impression\n```\n\n## Postbacks\n\nPostbacks are attribution reports the device sends to ad networks (and\noptionally to the advertised app developer) after a conversion event.\n\n### Conversion windows\n\nThree windows produce up to three postbacks for winning attributions:\n\n| Window | Duration            | Postback delay    |\n|--------|---------------------|-------------------|\n| 1st    | Days 0-2            | 24-48 hours       |\n| 2nd    | Days 3-7            | 24-144 hours      |\n| 3rd    | Days 8-35           | 24-144 hours      |\n\nTier 0 postbacks only produce the first postback. Nonwinning attributions\nproduce only one postback.\n\n### Time windows for events\n\n| Event                          | Time limit                              |\n|--------------------------------|-----------------------------------------|\n| View-through to install        | 24 hours (configurable up to 7 days)    |\n| Click-through to install       | 30 days (configurable down to 1 day)    |\n| Install to first update        | 60 days                                 |\n| Re-engagement to first update  | 2 days                                  |\n\n### Lock conversion values early\n\nLock the postback to finalize a conversion value before the window ends and\nreceive the postback sooner:\n\n```swift\ntry await Postback.updateConversionValue(\n    42,\n    coarseConversionValue: .high,\n    lockPostback: true\n)\n```\n\nAfter locking, the system ignores further updates in that conversion window.\n\n### Postback data by tier\n\n| Field                        | Tier 0 | Tier 1      | Tier 2      | Tier 3      |\n|------------------------------|--------|-------------|-------------|-------------|\n| `source-identifier` digits   | 2      | 2           | 2-4         | 2-4         |\n| `conversion-value` (fine)    | --     | --          | 1st only    | 1st only    |\n| `coarse-conversion-value`    | --     | 1st only    | 2nd\u002F3rd     | 2nd\u002F3rd     |\n| `publisher-item-identifier`  | --     | --          | --          | Yes         |\n| `country-code`               | --     | --          | --          | Conditional |\n\n## Conversion Values\n\n### Fine-grained values\n\nFine values are integers from 0...63 (6 bits). They are available only in the\nfirst postback and only at Tier 2 or higher:\n\n```swift\ntry await Postback.updateConversionValue(\n    35,\n    coarseConversionValue: .medium,\n    lockPostback: false\n)\n```\n\n### Coarse values\n\nThree levels for lower tiers and second\u002Fthird postbacks:\n\n```swift\n\u002F\u002F CoarseConversionValue cases: .low, .medium, .high\ntry await Postback.updateConversionValue(\n    10,\n    coarseConversionValue: .high,\n    lockPostback: false\n)\n```\n\n### Update by conversion type (iOS 18+)\n\nSeparate conversion values for install vs. re-engagement postbacks. In server\nJSON, use `\"conversion-type\": \"re-engagement\"` with the hyphen; Swift APIs use\n`.reengagement` without it.\n\n```swift\nlet installUpdate = PostbackUpdate(\n    fineConversionValue: 20,\n    lockPostback: false,\n    conversionTypes: [.install]\n)\ntry await Postback.updateConversionValue(installUpdate)\n\nlet reengagementUpdate = PostbackUpdate(\n    fineConversionValue: 12,\n    lockPostback: false,\n    conversionTypes: [.reengagement]\n)\ntry await Postback.updateConversionValue(reengagementUpdate)\n```\n\n### Conversion tags (iOS 18.4+)\n\nUse conversion tags to selectively update specific postbacks when overlapping\nconversion windows exist:\n\n```swift\nlet update = PostbackUpdate(\n    fineConversionValue: 15,\n    lockPostback: false,\n    conversionTag: savedConversionTag,\n    conversionTypes: [.reengagement]\n)\ntry await Postback.updateConversionValue(update)\n```\n\nThe system delivers the conversion tag through the re-engagement URL's\n`AdAttributionKitReengagementOpen` query parameter.\n\n## Re-engagement\n\nRe-engagement tracks users who already have the advertised app installed and\ninteract with an ad to return to it.\n\n### Mark impressions as re-engagement eligible\n\nSet `eligible-for-re-engagement` to `true` in the JWS payload when generating\nthe impression.\n\n### Handle re-engagement taps with a URL\n\nPass a universal link that the system opens in the advertised app:\n\n```swift\nlet reengagementURL = URL(string: \"https:\u002F\u002Fexample.com\u002Fpromo\u002Fsummer\")!\ntry await impression.handleTap(reengagementURL: reengagementURL)\n```\n\nThe system appends `AdAttributionKitReengagementOpen` as a query parameter. The\nadvertised app checks for this parameter to detect AdAttributionKit-driven\nopens:\n\n```swift\nfunc handleUniversalLink(_ url: URL) {\n    let components = URLComponents(url: url, resolvingAgainstBaseURL: false)\n    let isReengagement = components?.queryItems?.contains(where: {\n        $0.name == Postback.reengagementOpenURLParameter\n    }) ?? false\n\n    if isReengagement {\n        \u002F\u002F AdAttributionKit opened this app via a re-engagement ad\n    }\n}\n```\n\n### Re-engagement limits\n\n- Only click-through interactions create re-engagement postbacks (not\n  view-through).\n- The device enforces monthly per-app and yearly per-device re-engagement\n  limits.\n- The `AdAttributionKitReengagementOpen` parameter is always present on the\n  URL, even when the system does not create a postback.\n\n## Common Mistakes\n\n### Forgetting to update conversion value on launch\n\n```swift\n\u002F\u002F DON'T -- never updating the conversion value\nfunc appDidLaunch() {\n    \u002F\u002F No conversion value update; postback window never starts\n}\n\n\u002F\u002F DO -- update conversion value on first launch\nfunc appDidLaunch() async {\n    try? await Postback.updateConversionValue(0, lockPostback: false)\n}\n```\n\n### Using uppercase ad network IDs\n\n```xml\n\u003C!-- DON'T -->\n\u003Cstring>Example123.AdAttributionKit\u003C\u002Fstring>\n\n\u003C!-- DO -->\n\u003Cstring>example123.adattributionkit\u003C\u002Fstring>\n```\n\n### Calling handleTap without a current UIEventAttributionView tap\n\n```swift\n\u002F\u002F DON'T -- tap without a current attribution view tap or fresh impression\ntry await staleImpression.handleTap()\n\u002F\u002F Throws if the tap cannot be validated or the impression expired\n\n\u002F\u002F DO -- ensure UIEventAttributionView covers the ad and the impression is fresh\nlet attributionView = UIEventAttributionView()\nattributionView.frame = adView.bounds\nadView.addSubview(attributionView)\n\u002F\u002F Then handle the tap within 15 minutes after creating the AppImpression\ntry await impression.handleTap()\n```\n\n### Ignoring handleTap errors\n\n```swift\n\u002F\u002F DON'T\ntry? await impression.handleTap()\n\n\u002F\u002F DO -- handle specific errors\ndo {\n    try await impression.handleTap()\n} catch let error as AdAttributionKitError {\n    switch error {\n    case .impressionExpired:\n        \u002F\u002F Impression expired or is stale for click-through handling\n        refreshAdImpression()\n    case .missingAttributionView:\n        \u002F\u002F UIEventAttributionView not present\n        break\n    default:\n        print(\"Attribution error: \\(error)\")\n    }\n}\n```\n\n### Not responding to postback requests\n\n```swift\n\u002F\u002F DON'T -- silently dropping the request\n\u002F\u002F The device retries up to 9 times over 9 days on HTTP 500\n\n\u002F\u002F DO -- respond with 200 OK immediately\n\u002F\u002F Server handler:\nfunc handlePostback(request: Request) -> Response {\n    \u002F\u002F Process asynchronously, respond immediately\n    Task { await processPostback(request.body) }\n    return Response(status: .ok)\n}\n```\n\n## Review Checklist\n\n- [ ] Publisher app includes all ad network IDs in `AdNetworkIdentifiers`\n  (lowercase)\n- [ ] Ad network IDs match between publisher app's Info.plist and JWS `kid`\n- [ ] `UIEventAttributionView` overlays each tappable click-through ad\u002Fcontrol\n- [ ] Click-through `AppImpression` is no older than 15 minutes at `handleTap()`\n- [ ] Advertised app calls `updateConversionValue` on first launch\n- [ ] Server endpoint at well-known path accepts HTTPS POST with valid SSL\n- [ ] Postback verification uses correct Apple public key for environment\n- [ ] Duplicate postbacks filtered by `postback-identifier`\n- [ ] Server responds with HTTP 200 to postback requests\n- [ ] Re-engagement URL is a registered universal link for the advertised app\n- [ ] Conversion value strategy accounts for all three conversion windows\n- [ ] `AppImpression.isSupported` checked before attempting impression APIs\n\n## References\n\n- [references\u002Fadattributionkit-patterns.md](references\u002Fadattributionkit-patterns.md)\n  -- postback verification, server handling, testing, SKAdNetwork migration,\n  alternative marketplaces, attribution rules configuration\n- [Apple: AdAttributionKit](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit)\n- [Apple: Presenting ads in your app](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Fpresenting-ads-in-your-app)\n- [Apple: Receiving ad attributions and postbacks](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Freceiving-ad-attributions-and-postbacks)\n- [Apple: Verifying a postback](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Fverifying-a-postback)\n- [Apple: SKAdNetwork interoperability](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Fadattributionkit-skadnetwork-interoperability)\n","# AdAttributionKit\n\nPrivacy-preserving ad attribution for iOS 17.4+ \u002F Swift 6.3. AdAttributionKit\nlets ad networks measure conversions (installs and re-engagements) without\nexposing user-level data. It supports the App Store and alternative\nmarketplaces, and interoperates with SKAdNetwork.\n\nThree roles exist in the attribution flow: the **ad network** (signs\nimpressions, receives postbacks), the **publisher app** (displays ads), and the\n**advertised app** (the app being promoted).\n\n## Contents\n\n- [Overview and Privacy Model](#overview-and-privacy-model)\n- [Publisher App Setup](#publisher-app-setup)\n- [Advertiser App Setup](#advertiser-app-setup)\n- [Impressions](#impressions)\n- [Postbacks](#postbacks)\n- [Conversion Values](#conversion-values)\n- [Re-engagement](#re-engagement)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n## Overview and Privacy Model\n\nAdAttributionKit preserves user privacy through several mechanisms:\n\n- **Crowd anonymity tiers** -- the device limits postback data granularity based\n  on the crowd size associated with the ad, ranging from Tier 0 (minimal data)\n  to Tier 3 (most data including publisher ID and country code).\n- **Time-delayed postbacks** -- postbacks are sent 24-48 hours after conversion\n  window close (first window) or 24-144 hours (second\u002Fthird windows).\n- **No user-level identifiers** -- postbacks contain aggregate source\n  identifiers and conversion values, not device or user IDs.\n- **Hierarchical source identifiers** -- 2, 3, or 4-digit source IDs where the\n  number of digits returned depends on the crowd anonymity tier.\n\nIn migration and interoperability reviews, explicitly state that the system\nevaluates AdAttributionKit and SKAdNetwork impressions together, only one\nimpression wins per conversion, click-through beats view-through, and recency\nbreaks ties within click-through impressions before falling back to the most\nrecent view-through impression.\n\n## Publisher App Setup\n\nA publisher app displays ads from registered ad networks. Add each ad network's\nID to the app's Info.plist so its impressions qualify for install validation.\n\n### Add ad network identifiers\n\n```xml\n\u003Ckey>AdNetworkIdentifiers\u003C\u002Fkey>\n\u003Carray>\n    \u003Cstring>example123.adattributionkit\u003C\u002Fstring>\n    \u003Cstring>another456.adattributionkit\u003C\u002Fstring>\n\u003C\u002Farray>\n```\n\nAd network IDs must be lowercase. SKAdNetwork IDs (ending in `.skadnetwork`)\nare also accepted -- the frameworks share IDs.\n\n### Display a UIEventAttributionView\n\nFor click-through custom-rendered ads, place one `UIEventAttributionView` over\neach tappable ad\u002Fcontrol. It must cover the tappable area and stay above views\nthat would intercept touches before `handleTap()` succeeds.\n\n```swift\nimport UIKit\n\nlet attributionView = UIEventAttributionView()\nattributionView.frame = adContentView.bounds\nattributionView.isUserInteractionEnabled = true\nadContentView.addSubview(attributionView)\n```\n\n## Advertiser App Setup\n\nThe advertised app is the app someone installs or re-engages with after seeing\nan ad. It must call a conversion value update at least once to begin the\npostback conversion window.\n\n### Opt in to receive winning postback copies\n\nAdd `AttributionCopyEndpoint` under the top-level `AdAttributionKit` Info.plist\ndictionary so the device sends a copy of the winning postback to your server:\n\n```xml\n\u003Ckey>AdAttributionKit\u003C\u002Fkey>\n\u003Cdict>\n    \u003Ckey>AttributionCopyEndpoint\u003C\u002Fkey>\n    \u003Cstring>https:\u002F\u002Fexample.com\u003C\u002Fstring>\n\u003C\u002Fdict>\n```\n\nThe system derives the well-known endpoint from the registrable domain in the\nURL, ignoring subdomains:\n\n```\nhttps:\u002F\u002Fexample.com\u002F.well-known\u002Fappattribution\u002Freport-attribution\u002F\n```\n\nConfigure your server to accept HTTPS POST requests at that path. The domain\nmust have a valid SSL certificate.\n\n### Opt in for re-engagement postback copies\n\nAdd a second key in the same `AdAttributionKit` dictionary to also receive\ncopies of winning re-engagement postbacks:\n\n```xml\n\u003Ckey>AdAttributionKit\u003C\u002Fkey>\n\u003Cdict>\n    \u003Ckey>AttributionCopyEndpoint\u003C\u002Fkey>\n    \u003Cstring>https:\u002F\u002Fexample.com\u003C\u002Fstring>\n    \u003Ckey>OptInForReengagementPostbackCopies\u003C\u002Fkey>\n    \u003Ctrue\u002F>\n\u003C\u002Fdict>\n```\n\n### Update conversion value on first launch\n\nCall a conversion value update as early as possible after first launch to begin\nthe conversion window:\n\n```swift\nimport AdAttributionKit\n\nfunc applicationDidFinishLaunching() async {\n    do {\n        try await Postback.updateConversionValue(0, lockPostback: false)\n    } catch {\n        print(\"Failed to set initial conversion value: \\(error)\")\n    }\n}\n```\n\n## Impressions\n\nAd networks create signed impressions using JWS (JSON Web Signature). The\npublisher app uses `AppImpression` to register and handle those impressions.\n\n### Create an impression from a JWS\n\n```swift\nimport AdAttributionKit\n\nlet impression = try await AppImpression(compactJWS: signedJWSString)\n```\n\nThe JWS contains the ad network ID, advertised item ID, publisher item ID,\nsource identifier, timestamp, and optional re-engagement eligibility flag. See\n[references\u002Fadattributionkit-patterns.md](references\u002Fadattributionkit-patterns.md)\nfor JWS generation details.\n\n### Check device support\n\n```swift\nguard AppImpression.isSupported else {\n    \u002F\u002F Fall back to alternative ad display\n    return\n}\n```\n\n### View-through impressions\n\nRecord a view impression when the ad content has been displayed and dismissed:\n\n```swift\nfunc handleAdViewed(impression: AppImpression) async {\n    do {\n        try await impression.handleView()\n    } catch {\n        print(\"Failed to record view-through impression: \\(error)\")\n    }\n}\n```\n\nFor long-lived ad views, use `beginView()` and `endView()` to track view\nduration:\n\n```swift\ntry await impression.beginView()\n\u002F\u002F ... ad remains visible ...\ntry await impression.endView()\n```\n\n### Click-through impressions\n\nRespond to ad taps by calling `handleTap()` within 15 minutes of creating the\n`AppImpression`; otherwise request a fresh impression. If the advertised app is\nnot installed, the system opens its App Store or marketplace page. If installed,\nthe system launches it directly.\n\n```swift\nfunc handleAdTapped(impression: AppImpression) async {\n    do {\n        try await impression.handleTap()\n    } catch {\n        print(\"Failed to record click-through impression: \\(error)\")\n    }\n}\n```\n\nA `UIEventAttributionView` must overlay the ad for `handleTap()` to succeed.\n\n### StoreKit-rendered ads\n\nPass the impression to StoreKit overlay or product view controller APIs. StoreKit\nautomatically records view-through impressions after 2 seconds of display and\nclick-through impressions on tap.\n\n```swift\nimport StoreKit\n\nlet config = SKOverlay.AppConfiguration(appIdentifier: \"1234567890\",\n                                         position: .bottom)\nconfig.appImpression = impression\n```\n\n## Postbacks\n\nPostbacks are attribution reports the device sends to ad networks (and\noptionally to the advertised app developer) after a conversion event.\n\n### Conversion windows\n\nThree windows produce up to three postbacks for winning attributions:\n\n| Window | Duration            | Postback delay    |\n|--------|---------------------|-------------------|\n| 1st    | Days 0-2            | 24-48 hours       |\n| 2nd    | Days 3-7            | 24-144 hours      |\n| 3rd    | Days 8-35           | 24-144 hours      |\n\nTier 0 postbacks only produce the first postback. Nonwinning attributions\nproduce only one postback.\n\n### Time windows for events\n\n| Event                          | Time limit                              |\n|--------------------------------|-----------------------------------------|\n| View-through to install        | 24 hours (configurable up to 7 days)    |\n| Click-through to install       | 30 days (configurable down to 1 day)    |\n| Install to first update        | 60 days                                 |\n| Re-engagement to first update  | 2 days                                  |\n\n### Lock conversion values early\n\nLock the postback to finalize a conversion value before the window ends and\nreceive the postback sooner:\n\n```swift\ntry await Postback.updateConversionValue(\n    42,\n    coarseConversionValue: .high,\n    lockPostback: true\n)\n```\n\nAfter locking, the system ignores further updates in that conversion window.\n\n### Postback data by tier\n\n| Field                        | Tier 0 | Tier 1      | Tier 2      | Tier 3      |\n|------------------------------|--------|-------------|-------------|-------------|\n| `source-identifier` digits   | 2      | 2           | 2-4         | 2-4         |\n| `conversion-value` (fine)    | --     | --          | 1st only    | 1st only    |\n| `coarse-conversion-value`    | --     | 1st only    | 2nd\u002F3rd     | 2nd\u002F3rd     |\n| `publisher-item-identifier`  | --     | --          | --          | Yes         |\n| `country-code`               | --     | --          | --          | Conditional |\n\n## Conversion Values\n\n### Fine-grained values\n\nFine values are integers from 0...63 (6 bits). They are available only in the\nfirst postback and only at Tier 2 or higher:\n\n```swift\ntry await Postback.updateConversionValue(\n    35,\n    coarseConversionValue: .medium,\n    lockPostback: false\n)\n```\n\n### Coarse values\n\nThree levels for lower tiers and second\u002Fthird postbacks:\n\n```swift\n\u002F\u002F CoarseConversionValue cases: .low, .medium, .high\ntry await Postback.updateConversionValue(\n    10,\n    coarseConversionValue: .high,\n    lockPostback: false\n)\n```\n\n### Update by conversion type (iOS 18+)\n\nSeparate conversion values for install vs. re-engagement postbacks. In server\nJSON, use `\"conversion-type\": \"re-engagement\"` with the hyphen; Swift APIs use\n`.reengagement` without it.\n\n```swift\nlet installUpdate = PostbackUpdate(\n    fineConversionValue: 20,\n    lockPostback: false,\n    conversionTypes: [.install]\n)\ntry await Postback.updateConversionValue(installUpdate)\n\nlet reengagementUpdate = PostbackUpdate(\n    fineConversionValue: 12,\n    lockPostback: false,\n    conversionTypes: [.reengagement]\n)\ntry await Postback.updateConversionValue(reengagementUpdate)\n```\n\n### Conversion tags (iOS 18.4+)\n\nUse conversion tags to selectively update specific postbacks when overlapping\nconversion windows exist:\n\n```swift\nlet update = PostbackUpdate(\n    fineConversionValue: 15,\n    lockPostback: false,\n    conversionTag: savedConversionTag,\n    conversionTypes: [.reengagement]\n)\ntry await Postback.updateConversionValue(update)\n```\n\nThe system delivers the conversion tag through the re-engagement URL's\n`AdAttributionKitReengagementOpen` query parameter.\n\n## Re-engagement\n\nRe-engagement tracks users who already have the advertised app installed and\ninteract with an ad to return to it.\n\n### Mark impressions as re-engagement eligible\n\nSet `eligible-for-re-engagement` to `true` in the JWS payload when generating\nthe impression.\n\n### Handle re-engagement taps with a URL\n\nPass a universal link that the system opens in the advertised app:\n\n```swift\nlet reengagementURL = URL(string: \"https:\u002F\u002Fexample.com\u002Fpromo\u002Fsummer\")!\ntry await impression.handleTap(reengagementURL: reengagementURL)\n```\n\nThe system appends `AdAttributionKitReengagementOpen` as a query parameter. The\nadvertised app checks for this parameter to detect AdAttributionKit-driven\nopens:\n\n```swift\nfunc handleUniversalLink(_ url: URL) {\n    let components = URLComponents(url: url, resolvingAgainstBaseURL: false)\n    let isReengagement = components?.queryItems?.contains(where: {\n        $0.name == Postback.reengagementOpenURLParameter\n    }) ?? false\n\n    if isReengagement {\n        \u002F\u002F AdAttributionKit opened this app via a re-engagement ad\n    }\n}\n```\n\n### Re-engagement limits\n\n- Only click-through interactions create re-engagement postbacks (not\n  view-through).\n- The device enforces monthly per-app and yearly per-device re-engagement\n  limits.\n- The `AdAttributionKitReengagementOpen` parameter is always present on the\n  URL, even when the system does not create a postback.\n\n## Common Mistakes\n\n### Forgetting to update conversion value on launch\n\n```swift\n\u002F\u002F DON'T -- never updating the conversion value\nfunc appDidLaunch() {\n    \u002F\u002F No conversion value update; postback window never starts\n}\n\n\u002F\u002F DO -- update conversion value on first launch\nfunc appDidLaunch() async {\n    try? await Postback.updateConversionValue(0, lockPostback: false)\n}\n```\n\n### Using uppercase ad network IDs\n\n```xml\n\u003C!-- DON'T -->\n\u003Cstring>Example123.AdAttributionKit\u003C\u002Fstring>\n\n\u003C!-- DO -->\n\u003Cstring>example123.adattributionkit\u003C\u002Fstring>\n```\n\n### Calling handleTap without a current UIEventAttributionView tap\n\n```swift\n\u002F\u002F DON'T -- tap without a current attribution view tap or fresh impression\ntry await staleImpression.handleTap()\n\u002F\u002F Throws if the tap cannot be validated or the impression expired\n\n\u002F\u002F DO -- ensure UIEventAttributionView covers the ad and the impression is fresh\nlet attributionView = UIEventAttributionView()\nattributionView.frame = adView.bounds\nadView.addSubview(attributionView)\n\u002F\u002F Then handle the tap within 15 minutes after creating the AppImpression\ntry await impression.handleTap()\n```\n\n### Ignoring handleTap errors\n\n```swift\n\u002F\u002F DON'T\ntry? await impression.handleTap()\n\n\u002F\u002F DO -- handle specific errors\ndo {\n    try await impression.handleTap()\n} catch let error as AdAttributionKitError {\n    switch error {\n    case .impressionExpired:\n        \u002F\u002F Impression expired or is stale for click-through handling\n        refreshAdImpression()\n    case .missingAttributionView:\n        \u002F\u002F UIEventAttributionView not present\n        break\n    default:\n        print(\"Attribution error: \\(error)\")\n    }\n}\n```\n\n### Not responding to postback requests\n\n```swift\n\u002F\u002F DON'T -- silently dropping the request\n\u002F\u002F The device retries up to 9 times over 9 days on HTTP 500\n\n\u002F\u002F DO -- respond with 200 OK immediately\n\u002F\u002F Server handler:\nfunc handlePostback(request: Request) -> Response {\n    \u002F\u002F Process asynchronously, respond immediately\n    Task { await processPostback(request.body) }\n    return Response(status: .ok)\n}\n```\n\n## Review Checklist\n\n- [ ] Publisher app includes all ad network IDs in `AdNetworkIdentifiers`\n  (lowercase)\n- [ ] Ad network IDs match between publisher app's Info.plist and JWS `kid`\n- [ ] `UIEventAttributionView` overlays each tappable click-through ad\u002Fcontrol\n- [ ] Click-through `AppImpression` is no older than 15 minutes at `handleTap()`\n- [ ] Advertised app calls `updateConversionValue` on first launch\n- [ ] Server endpoint at well-known path accepts HTTPS POST with valid SSL\n- [ ] Postback verification uses correct Apple public key for environment\n- [ ] Duplicate postbacks filtered by `postback-identifier`\n- [ ] Server responds with HTTP 200 to postback requests\n- [ ] Re-engagement URL is a registered universal link for the advertised app\n- [ ] Conversion value strategy accounts for all three conversion windows\n- [ ] `AppImpression.isSupported` checked before attempting impression APIs\n\n## References\n\n- [references\u002Fadattributionkit-patterns.md](references\u002Fadattributionkit-patterns.md)\n  -- postback verification, server handling, testing, SKAdNetwork migration,\n  alternative marketplaces, attribution rules configuration\n- [Apple: AdAttributionKit](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit)\n- [Apple: Presenting ads in your app](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Fpresenting-ads-in-your-app)\n- [Apple: Receiving ad attributions and postbacks](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Freceiving-ad-attributions-and-postbacks)\n- [Apple: Verifying a postback](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Fverifying-a-postback)\n- [Apple: SKAdNetwork interoperability](https:\u002F\u002Fsosumi.ai\u002Fdocumentation\u002Fadattributionkit\u002Fadattributionkit-skadnetwork-interoperability)\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fskills_sh\u002Fs\u002Fskills-sh_dpearson2699_swift-ios-skills_adattributionkit",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill adattributionkit",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill adattributionkit",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill adattributionkit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fskills_sh\u002Fs\u002Fskills-sh_dpearson2699_swift-ios-skills_adattributionkit\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]