SDK

iOS SDK (Swift)

Native Swift package for creator install attribution and promo-code offers. Works without IDFA and without an App Tracking Transparency prompt. Cold-install matching is scored and best-effort. Details: How attribution works.

Prerequisites

1. Add the Swift package

Xcode → File → Add Package Dependencies, then:

https://github.com/tapapplink/tapapplink-ios

In a Package.swift:

.package(url: "https://github.com/tapapplink/tapapplink-ios", from: "0.1.1")

2. Configure, track, identify

Call from your App init or application(_:didFinishLaunchingWithOptions:).

import TapAppLink
import RevenueCat

TapAppLink.configure(.init(
  publicKey: "YOUR_TAPAPPLINK_KEY",
  environment: .production
))

try await TapAppLink.trackInstall()
try await TapAppLink.setAppUserId(Purchases.shared.appUserID)

if let offer = TapAppLink.getOffer(),
   let offeringId = offer.billingOfferId {
  // Present the RevenueCat offering with this identifier
}

3. Discount codes

try await TapAppLink.applyCode("SARAH10")
let offer = TapAppLink.getOffer()

Present the RevenueCat (or other) offering in getOffer()?.billingOfferId. Full guide: Discount codes.

SDK reference

MethodPurpose
configureSet public key, environment, optional ingest URL.
trackInstall()First open. Matches a recent click in this environment.
setAppUserId(id)Bridge the billing customer id for webhooks.
getOffer()Creator discount after a match or redeem.
applyCode(code)Attribute from a promo code typed at checkout.
resetForTesting()Clear cached install state in debug builds.

Important notes