Apple Search Ads

Promote your app on the App Store.

How to set up integration?

1. Send Apple Search Ads Attribution Data to Apphud

Import iAd framework and add the following lines to AppDelegate:

Swift
Objective-C
Swift
import iAd
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Apphud.start(apiKey: APPHUD_API_KEY)
// send search ads attribution data to Apphud
ADClient.shared().requestAttributionDetails { (data, error) in
if let data = data {
Apphud.addAttribution(data: data, from: .appleSearchAds, callback: nil)
}
}
return true
}
Objective-C
#import <iAd/iAd.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Apphud startWithApiKey:@"YOUR_TOKEN" userID:nil];
// send search ads attribution data to Apphud
[[ADClient sharedClient] requestAttributionDetailsWithBlock:^(NSDictionary<NSString *,NSObject *> * _Nullable attributionDetails, NSError * _Nullable error) {
if (attributionDetails != nil) {
[Apphud addAttributionWithData:attributionDetails from:ApphudAttributionProviderAppleSearchAds identifer:nil callback:nil];
}
}];
return YES;
}

2. View Attribution Data in Apphud user page

You can view attribution data from Apple Search Ads in user page in Apphud dashboard.