Generate Apple Search Ads API credentials
Apple Search Ads requires you to create a separate API useraccount to generate credentials — this is different from your regular login account. You'll need to invite yourself using another email address you own (or create one for this purpose).
Invite an API user
- In Apple Search Ads, go to Settings → User Management.
- Click Invite Users.
- Enter another email address you own.
- Set the role to API Account — Read Only.
Get your Account ID
- Go to searchads.apple.com and log in with your main account.
- Click your name in the top-right corner and look for Account ID next to your organization name (e.g.
Account ID: 391139). - Copy this Account ID and paste it into the AppSkale form field.
Generate API credentials
- Log out of your main Apple Search Ads account.
- Log back in with your secondary email (the API account).
- Go to Settings → API.
- Click Create Credential (or Add Certificate).
- When you see the Public Key field, paste the key below:
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIQKaSROKEZSXTyRZIyBhwSoY04x8
/GNCv3cyfsuNSeDV0UCKWbxDZljPo0DEWwDUeiw3wgTaFndxzwnR3s9qvQ- Click Generate (or Create).
- Client ID (e.g.
SEARCHADS.abc123…) - Team ID (e.g.
SEARCHADS.def456…) - Key ID (e.g.
a1b2c3d4-5678…)
Then click Save & Continue.
Configure your iOS app in AppSkale
Next, add your iOS app to AppSkale so it can start tracking attribution and revenue.
Add your app
- App Name * — the name of your app as it appears in the App Store.
- App Store URL *— your app's URL from the App Store; must include the app ID. Format:
https://apps.apple.com/us/app/your-app/id1234567890 - Bundle ID *— your app's unique identifier, found in Xcode or App Store Connect. Format:
com.yourcompany.yourapp
appskale_abc123def456…Set up the RevenueCat webhook
The webhook is how RevenueCat tells AppSkale about real-time purchases, renewals, and refunds — so we can attribute revenue back to the keyword that drove each user.
- Go to app.revenuecat.com and navigate to Integrations → Webhooks.
- Click + Add (or Add Webhook).
- Paste this Webhook URL:
https://api.appskale.ai/api/webhooks/revenuecat- Authorization Header Value: paste your AppSkale API key directly — e.g.
appskale_abc123def456… - Environment: select both Production and Sandbox.
- Apps: select your app. Events: select all events.
- Click Save.
Install the AppSkale SDK
The SDK automatically tracks installs and retrieves Apple Search Ads attribution data on device.
Installation
You can install the AppSkale SDK using either CocoaPods or Swift Package Manager:
Option 1: CocoaPods
Add to your Podfile:
pod 'AppSkaleSDK'
Then run in your Terminal:
pod install
Option 2: Swift Package Manager (SPM)
1. In Xcode, go to File > Add Packages…
2. Enter the repository URL:
https://github.com/appskale/appskale-sdk-ios
3. Select the latest version and target your project
4. Click "Add Package"After installing the SDK, add this code to your AppDelegate.swift file:
import AppSkaleSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
ApplicationDelegate.shared.application(
application,
didFinishLaunchingWithOptions: launchOptions
)
AppSkaleAttribution.shared.configure(
apiKey: "YOUR_API_KEY_HERE"
)
return true
}
}YOUR_API_KEY_HERE with the actual API key from the setup page.Track purchases
Add this code wherever you handle successful purchases — typically inside your RevenueCat purchase completion handler:
Purchases.shared.purchase(package: package) {
(transaction, purchaserInfo, error, userCancelled) in
// After successful purchase, track with AppSkale:
if let transaction = transaction {
let price = package.storeProduct.price as Decimal
let currency = package.storeProduct.priceFormatter?
.currencyCode ?? "USD"
AppSkaleAttribution.shared.trackPurchase(
transactionId: transaction.transactionIdentifier ?? "unknown",
productId: package.storeProduct.productIdentifier,
price: NSDecimalNumber(decimal: price).doubleValue,
currency: currency
)
}
}Need a hand?
If you get stuck on any step, email support@appskale.ai and we'll walk you through it.