Adobe Analytics - Mobile Services
This extension enables in-app messaging, push notifications, and marketing links functionality from Mobile Services on the Experience Platform SDK.
As of April 1, 2020, Apple will no longer support UIWebView. To avoid any issues, ensure that you are using the iOS extension versions 1.0.3 or later. For more information, see Apple's documentation on UIWebView.
The Adobe Analytics Mobile Marketing Add-on SKU is required to enable Mobile Services access to mobile acquisition, deep linking, geolocation, and mobile messaging capabilities.
For more information, please contact your Adobe Customer Success Manager.
Review the following Mobile Services functionality documentation for context and set up before implementation at these links:
Postbacks created from the Mobile Services interface are not supported. Please use a Launch rule with the Mobile Core extension to create a postback. Signal extension and Rules Engine integration.
Before you configure the Mobile Services extension, ensure that you previously created apps in Mobile Services. To learn how to create an app in Mobile Services, see the add a new App tutorial.
To use location-based functionality for Mobile Services, see the documentation on the Places Service.
To use the Mobile Services extension, complete the following steps:
    1.
    Configure the Mobile Services extension in Launch.
    2.
    If using acquisition and marketing links, update your configuration in the Analytics extension.
    3.
    Add Mobile Services extension to your app.
    4.
    Implement the Mobile Services APIs in your app.

Configure the Mobile Services extension in Experience Platform Launch

The Mobile Services extension requires the Analytics extension for reporting. It uses the report suite that is specified in the Analytics extension for reporting. However, the Mobile Services extension uses the report suite that is configured for the app in Mobile Services for push and in-app messaging, acquisition, marketing links, and app management. If the report suite in the two locations do not match, a push message from the wrong report suite may be sent.
    1.
    In Experience Platform Launch, click the Extensions tab.
    2.
    Choose Catalog, locate the Adobe Analytics – Mobile Services extension, and click Install.
    3.
    Select a Mobile Services app and complete the following tasks:
      1.
      In Mobile Services app, select app from the drop-down list.
      2.
      Click Save.
      3.
      Follow the publishing process to update the SDK configuration.
Mobile Services Extension Configuration

Manual configuration

The following instructions only apply if you do not see your app listed or need to manually configure your Mobile Services app.
If you are sending data to multiple Analytics report suites, use the Acquisition App ID from the app that is associated with the first report suite in your list of report suite IDs.
To install the Mobile Services extension, complete the following steps:
    1.
    Select Enter Custom settings.
    2.
    Enter an Acquisition time out. The recommended time out is 5 seconds. To enable app acquisition, this value must be greater than 0.
    3.
    Provide the Acquisition App ID (sample value: 0eb9f2791f0880623f91e41e5309d2ae25066e513054a4cb59168dc886b526da)).
    You can find the Acquisition App ID in Mobile Services.
    4.
    Select your app, navigate to Manage App Settings page, and in the SDK Acquisition Options section, copy the hashed string similar to the highlighted value:
    5.
    Provide the Messages URL. This value would look something similar to: https://assets.adobedtm.com/b213432c5204bf94318f4ef0539a38b487d10368/scripts/satellite-5c7711bc64746d7f5800036e.json
    You can find the Messages URL from your ADBMobileConfig.json file typically near the bottom of the file.
    6.
    Click Save.
    7.
    Follow the publishing process to update your SDK configuration.

Configure the Adobe Analytics extension

    1.
    To ensure that this extension is correctly configured and implemented, follow the steps in the configure the Mobile Services extension in Experience Platform Launch tutorial.
    2.
    In Launch Hit Delay, type a value of 5s or more to ensure that the acquisition context is sent to Analytics with your Lifecycle information.

Add the Mobile Services extension to your app

The Mobile Services extension depends on the Core extension, which includes the Identity and Lifecycle frameworks and the Analytics extension.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
Add the Mobile Services extension to your project using the app's Gradle file.

Java

Import the Mobile Services extension in your application's main activity.
1
import com.adobe.marketing.mobileservices.*;
Copied!
You can add the library to your project through your Podfile by adding the AEPMobileServices pod.
Import the library into your project:

Swift

1
import AEPCore
2
import AEPServices
3
import AEPIdentity
4
import AEPLifecycle
5
import AEPAnalytics
6
import AEPMobileServices
Copied!

Objective-C

1
@import AEPCore
2
@import AEPServices;
3
@import AEPIdentity
4
@import AEPLifecycle
5
@import AEPAnalytics
6
@import AEPMobileServices
Copied!
You can add the library to your project through your Podfile by adding the ACPMobileServices pod.
Import the library into your project:

Objective-C

1
#import "ACPCore.h"
2
#import “ACPIdentity.h”
3
#import “ACPLifecycle.h”
4
#import "ACPAnalytics.h"
5
#import "ACPMobileServices.h"
Copied!

Swift

1
import ACPCore
2
import ACPIdentity
3
import ACPLifecycle
4
import ACPAnalytics
5
import ACPMobileServices
Copied!

Register Mobile Services with Mobile Core

Android
iOS (AEP 3.x)
iOS (ACP 2.x)

Java

Call the setApplication() method once in the onCreate() method of your main activity. For example, your code might look like the following:
1
public class MobileServicesApp extends Application {
2
3
@Override
4
public void onCreate() {
5
super.onCreate();
6
MobileCore.setApplication(this);
7
8
try {
9
Analytics.registerExtension();
10
MobileServices.registerExtension(); //Register Mobile Services with Mobile Core
11
Lifecycle.registerExtension();
12
Identity.registerExtension();
13
MobileCore.start(null);
14
} catch (Exception e) {
15
//Log the exception
16
}
17
}
18
}
Copied!
In your app's application:didFinishLaunchingWithOptions function, register the Mobile Services extension with the Mobile Core:

Swift

1
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2
MobileCore.registerExtensions([Identity.self, Lifecycle.self, Analytics.self, AEPMobileServices.self], {
3
MobileCore.configureWith(appId: "yourLaunchEnvironmentID")
4
MobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"])
5
})
6
...
7
}
Copied!

Objective-C

1
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
2
NSArray *extensionsToRegister = @[AEPMobileIdentity.class, AEPMobileLifecycle.class, AEPMobileAnalytics.class, AEPMobileServices.class];
3
[AEPMobileCore registerExtensions:extensionsToRegister completion:^{
4
// Use the App id assigned to this application via Adobe Launch
5
[AEPMobileCore configureWithAppId: @"yourLaunchEnvironmentID"];
6
[AEPMobileCore lifecycleStart:@{@"contextDataKey": @"contextDataVal"}];
7
}];
8
....
9
}
Copied!
In your app's application:didFinishLaunchingWithOptions function, register the Mobile Services extension with the Mobile Core:

Objective-C

1
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
2
[ACPAnalytics registerExtension];
3
[ACPLifecycle registerExtension];
4
[ACPIdentity registerExtension];
5
[ACPMobileServices registerExtension];
6
[ACPCore start:nil]
7
// Override point for customization after application launch.
8
return YES;
9
}
Copied!

Swift

1
func application(_application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{
2
ACPAnalytics.registerExtension()
3
ACPIdentity.registerExtension()
4
ACPLifecycle.registerExtension()
5
ACPMobileServices.registerExtension()
6
ACPCore.start {
7
ACPCore.lifecycleStart(nil)
8
}
9
...
10
return true
11
}
Copied!

Implement Mobile Services APIs in your app

To use your Android or iOS extension with the Experience Platform SDKs, implement the following APIs:

Set up push messaging

Android
iOS (AEP 3.x)
iOS (ACP 2.x)
Obtain the registration ID/token by using the Firebase Cloud Messaging (FCM) APIs.

Java

Syntax
1
void setPushIdentifier(final String registrationID)
Copied!
Example
1
MobileCore.setPushIdentifier(registrationID);
Copied!
iOS simulators do not support push messaging.
After following Apple's configure remote notification document, to get your app ready to handle push notifications, set the push token by using the setPushIdentifier API:
Syntax
1
@objc(setPushIdentifier:)
2
public static func setPushIdentifier(_ deviceToken: Data?)
Copied!
Example

Swift

1
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
2
let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
3
let token = tokenParts.joined()
4
print("Device Token: (token)")
5
6
// Send push token to experience platform
7
MobileCore.setPushIdentifier(deviceToken)
8
}
Copied!

Objective-C

1
- (void)application:(UIApplication *)app
2
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
3
// Forward the token to your provider, using a custom method.
4
NSUInteger len = devToken.length;
5
if (len == 0) {
6
return;
7
}
8
const unsigned char *buffer = devToken.bytes;
9
NSMutableString *hexString = [NSMutableString stringWithCapacity:(len * 2)];
10
for (int i = 0; i < len; ++i) {
11
[hexString appendFormat:@"%02x", buffer[i]];
12
}
13
NSString *token = [hexString copy];
14
[AEPMobileCore setPushIdentifier:token];
15
}
Copied!
iOS simulators do not support push messaging.
After following Apple's configure remote notification document, to get your app ready to handle push notifications, set the push token by using the setPushIdentifier API:
Syntax
1
+ (void) setPushIdentifier: (nullable NSData*) deviceToken;
Copied!
Example

Objective-C

1
- (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
2
// Set the deviceToken that the APNS has assigned to the device
3
[ACPCore setPushIdentifier:deviceToken];
4
//...
5
}
Copied!

Swift

1
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
2
let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
3
let token = tokenParts.joined()
4
print("Device Token: (token)")
5
6
// Send push token to experience platform
7
ACPCore.setPushIdentifier(deviceToken)
8
}
Copied!

Debugging the push messaging set up

If the Mobile Services API is correctly configured, after installing your app on a mobile device, verify that the following SDK debug log is displayed:
To verify, make a request to demdex.net, containing the device push token has been sent:
1
2019-01-31 18:22:35.261676-0800 DemoApp[935:156015] [AMSDK DEBUG <com.adobe.module.identity>]: Sending request (https://dpm.demdex.net/id?d_rtbd=json&d_ver=2&[email protected]&d_mid=43583282444503123217621782542046274680&d_blob=j8Odv6LonN4r3an7LhD3WZrU1bUpAkFkkiY1ncBR96t2PTI&dcs_region=9)
Copied!

Set up push tracking

Use the following API to track a push messaging click in Adobe Analytics.
Using the following API does not increment page views.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
On Android, the SDK handles push tracking to analytics without any additional set up. If the application has implemented the FirebaseMessaginService class and will handle the push notifications when the application is in foreground, read the push data from the received Intent and add it to the intent extras of the Activity to be launched. An example can be found in the Mobile Services implement push messaging tutorial.
Use the following API to track a push messaging click in Adobe Analytics.
Syntax
1
@objc(collectLaunchInfo:)
2
public static func collectLaunchInfo(_ userInfo: [String: Any])
Copied!
Example

Swift

1
AEPCore.collectLaunchInfo(userInfo)
Copied!

Objective-C

1
[AEPMobileCore collectLaunchInfo:userInfo];
Copied!
Use the following API to track a push messaging click in Adobe Analytics.
Syntax
1
+ (void) collectLaunchInfo:(NSDictionary *)userInfo;
Copied!
Example

Objective-C

1
[ACPCore collectLaunchInfo:userInfo];
Copied!

Swift

1
ACPCore.collectLaunchInfo(userInfo)
Copied!

Troubleshooting push messaging

For more information, see the following:

Set up in-app messaging

This feature allows you to deliver in-app messages that are triggered from any analytics data or event. After the implementation, messages are dynamically delivered to the app and do not require a code update. In-app messages are created in Mobile Services. For more information, see the create an in-app message tutorial.
To set up your app for in-app messages, implement the following instructions. You can complete these steps even if you have not yet defined any messages in Mobile Services. After you define messages, they are delivered dynamically to your app and displayed without an app store update.
Android
iOS
Update the AndroidManifest.xml file to declare the full screen activity and enable the Message Notification Handler.

Java

If you are using either fullscreen message or local notification functionality, update the AndroidManifest.xml with the following:
1
<activity
2
android:name="com.adobe.marketing.mobile.MessageFullScreenActivity"
3
android:windowSoftInputMode="adjustUnspecified|stateHidden" >
4
</activity>
5
<receiver android:name="com.adobe.marketing.mobile.MessageNotificationHandler" />
Copied!
If you selected a modal layout, select one of the following themes for the message:
    Theme.Translucent.NoTitleBar.Fullscreen
    Theme.Translucent.NoTitleBar
    Theme.Translucent
Example
1
<activity
2
android:name="com.adobe.marketing.mobile.MessageFullScreenActivity"
3
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
4
android:windowSoftInputMode="adjustUnspecified|stateHidden" >
5
</activity>
6
<receiver android:name="com.adobe.marketing.mobile.MessageNotificationHandler" />
Copied!
No setup is required for iOS, since Mobile SDK automatically handles in-app message support.

Fallback images

When creating a full-screen message, you can optionally specify a fallback image. If your message cannot retrieve its intended image from the web, the SDK attempts to load the image with the same name from your application’s assets folder. This allows you to show your message in its original form, even if the user is offline or the predetermined image is unreachable.
The fallback image asset name is specified when you configure the message in Mobile Services. You need to ensure that the specified resource is available.

Configuring notification icons

The following methods allow you to configure the small and large icons that appear in the notification area, and the large icon that is displayed when notifications appear in the notification drawer.
Android
iOS

setSmallIconResourceId

This API sets the small icon that is used for notifications that are created by the SDK. This icon appears in the status bar and is the secondary image that is displayed shown when the user sees the complete notification in the notification center.
Syntax
1
public static void setSmallIconResourceId(final int resourceId);
Copied!
Example
1
MobileCore.setSmallIconResourceID(R.drawable.appIcon);
Copied!
No setup is required on iOS, since icons are automatically handled by the SDK.
Android
iOS

setLargeIconResourceId()

This API sets the large icon that is used for notifications that are created by the SDK. This icon is the primary image that is displayed when the user sees the complete notification in the notification center.
Syntax
1
public static void setLargeIconResourceId(final int resourceId);
Copied!
Example
1
MobileCore.setLargeIconResourceId(R.drawable.appIcon);
Copied!
No setup is required, since icons are automatically handled by the SDK for iOS.

Tracking in-app messages

The SDK automatically tracks metrics for your in-app messages.
For full screen and alert style in-app messages, the following metrics are tracked:
    Impressions: when user triggers an in-app message.
    Click throughs: when user clicks the Click through button.
    Cancels: when user clicks the Cancel button.
For custom full screen in-app messages, the HTML content in the message needs to include the correct code to notify the SDK tracking about the following buttons:
    Click-through (redirect) example tracking: adbinapp://confirm/?url=http://www.yoursite.com
    Cancel (close) example tracking: adbinapp://cancel
For local (remote) notifications, the following metrics are tracked:
    Impressions: when user triggers the notification.
    Opens: when user opens app from the notification.
The following example shows you how to include open tracking:
iOS
1
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
2
3
// handle local notification click-throughs for iOS 10 and older
4
NSDictionary *localNotificationDictionary = launchOptions[UIApplicationLaunchOptionsLocalNotificationKey];
5
if ([localNotificationDictionary isKindOfClass:[NSDictionary class]]) {
6
[ACPCore collectLaunchInfo:localNotificationDictionary];
7
}
8
9
}
10
- (void) application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
11
[ACPCore collectLaunchInfo:notification.userInfo];
12
}
Copied!

Troubleshooting in-app messaging

For more information, see the following:
Acquisition and marketing links must be created in Adobe Mobile Services. For more information, see the documentation on Acquisition within the Mobile Services.
The following configuration collects Acquisition link context from links that were created in Mobile Services and collects referrer data from the Google Play store.
When the user downloads and runs an app as the result of a Google Play store acquisition, the data from the referrer is collected and sent to Adobe Mobile Services. Custom keys that were part of the acquisition data from Google Play are name-spaced with a.acquisition.custom.

Using the BroadcastReceiver

    1.
    Implement the BroadcastReceiver for the referrer.
    1
    package com.your.package.name; // replace with your app package name
    2
    3
    import android.content.BroadcastReceiver;
    4
    import android.content.Context;
    5
    import android.content.Intent;
    6
    7
    public class GPBroadcastReceiver extends BroadcastReceiver {
    8
    @Override
    9
    public void onReceive(Context c, Intent i) {
    10
    com.adobe.marketing.mobile.MobileServices.processReferrer(c, i);
    11
    }
    12
    }
    Copied!
    2.
    Update the AndroidManifest.xml to enable the BroadcastReceiver you previously created.
    1
    <receiver android:name="com.your.package.name.GPBroadcastReceiver" android:exported="true">
    2
    <intent-filter>
    3
    <action android:name="com.android.vending.INSTALL_REFERRER" />
    4
    </intent-filter>
    5
    </receiver>
    Copied!

Using the Google Play Install Referrer APIs

Starting on March 1, 2020, Google is deprecating the install_referrer intent broadcast mechanism. For more information, see the Still Using InstallBroadcast? Switch to the Play Referrer API by March 1, 2020 . To continue collecting install referrer information from the Google Play store, update your application to use the Mobile Services extension version 1.1.0 or newer.
With the deprecation, instead of creating a BroadcastReceiver, you need to collect the install referrer URL from a new Google API and pass the resulting URL to the SDK.
    1.
    Add the Google Play Install Referrer package to your gradle file's dependencies:
    1
    implementation 'com.android.installreferrer:installreferrer:1.1'
    Copied!
    2.
    To retrieve the referrer URL from the Install Referrer API, complete the steps in the get the install referrer tutorial.
    3.
    Pass the referrer URL to the SDK:
    1
    MobileServices.processGooglePlayInstallReferrerUrl(referrerUrl);
    Copied!
    To decide the best way to use the Google Play Install Referrer APIs in your app, see Google's documentation. Here is an example of how to use the Adobe SDK with the Google Play Install Referrer APIs:
    1
    void handleGooglePlayReferrer() {
    2
    // Google recommends only calling this API the first time you need it:
    3
    // https://developer.android.com/google/play/installreferrer/library#install-referrer
    4
    5
    // Store a boolean in SharedPreferences to ensure we only call it once.
    6
    final SharedPreferences prefs = getSharedPreferences("acquisition", 0);
    7
    if (prefs != null) {
    8
    if (prefs.getBoolean("referrerHasBeenProcessed", false)) {
    9
    return;
    10
    }
    11
    }
    12
    13
    final InstallReferrerClient referrerClient = InstallReferrerClient.newBuilder(getApplicationContext()).build();
    14
    referrerClient.startConnection(new InstallReferrerStateListener() {
    15
    private boolean complete = false;
    16
    17
    @Override
    18
    public void onInstallReferrerSetupFinished(int responseCode) {
    19
    switch (responseCode) {
    20
    case InstallReferrerClient.InstallReferrerResponse.OK:
    21
    // connection is established
    22
    complete();
    23
    try {
    24
    final ReferrerDetails details = referrerClient.getInstallReferrer();
    25
    26
    // pass the install referrer url to the SDK
    27
    MobileServices.processGooglePlayInstallReferrerUrl(details.getInstallReferrer());
    28
    29
    } catch (final RemoteException ex) {
    30
    Log.w("Acquisition - RemoteException while retrieving referrer information (%s)", ex.getLocalizedMessage() == null ? "unknown" : ex.getLocalizedMessage());
    31
    } finally {
    32
    referrerClient.endConnection();
    33
    }
    34
    break;
    35
    case InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED:
    36
    case InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE:
    37
    default:
    38
    // API not available in the Play Store app - nothing to do here
    39
    complete();
    40
    referrerClient.endConnection();
    41
    break;
    42
    }
    43
    }
    44
    45
    @Override
    46
    public void onInstallReferrerServiceDisconnected() {
    47
    if (!complete) {
    48
    // something went wrong trying to get a connection, try again
    49
    referrerClient.startConnection(this);
    50
    }
    51
    }
    52
    53
    void complete() {
    54
    complete = true;
    55
    SharedPreferences.Editor editor = getSharedPreferences("acquisition", 0).edit();
    56
    editor.putBoolean("referrerHasBeenProcessed", true);
    57
    editor.apply();
    58
    }
    59
    });
    60
    }
    Copied!
No setup is required, since Acquisition context is automatically collected and tracked by the SDK.
The SDK can parse key-value pairs of data that are appended to any deep or universal link, provided the link contains a key a.deeplink.id and a corresponding non-null and user generated value. All key-value pairs of data that are appended to the URL string are parsed, attached to a lifecycle hit as context data, and sent to Adobe Analytics.
You can also append one or more of the following reserved keys, with user-generated values, to the deep or universal link:
    a.launch.campaign.trackingcode
    a.launch.campaign.source
    a.launch.campaign.medium
    a.launch.campaign.medium
    a.launch.campaign.content
Ensure that the deep link URL has the a.deeplink.id key in the URL string. If a.deeplink.id is not found, none of the appended URL parameters are sent to Analytics via context data.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
Syntax
1
public static void trackAdobeDeepLink(final Uri uri)
Copied!
Example
Java
1
MobileServices.trackAdobeDeepLink
Copied!
Syntax
1
+ (void) trackAdobeDeepLink: (NSURL* _Nonnull) deeplink;
Copied!
Example
Swift
1
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
2
AEPMobileServices.trackAdobeDeepLink(url)
3
/*
4
Handle deep link
5
*/
6
return true
7
}
Copied!
Objective-C
1
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
2
[AEPMobileServices trackAdobeDeepLink:url];
3
....
4
}
Copied!
In iOS 13 and later, for a scene-based application, use the UISceneDelegate's scene(_:openURLContexts:) method as follows:
Swift
1
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
2
guard let urlContexts = URLContexts.first else { return }
3
AEPMobileServices.trackAdobeDeepLink(urlContexts.url)
4
/*
5
Handle deep link
6
*/
7
}
Copied!
Objective-C
1
- (void)scene:(UIScene *)scene openURLContexts:(nonnull NSSet<UIOpenURLContext *> *)URLContexts {
2
NSURL *url = [[URLContexts allObjects] firstObject].URL;
3
[AEPMobileServices trackAdobeDeepLink:url];
4
}
Copied!
Syntax
1
+ (void) trackAdobeDeepLink: (NSURL* _Nonnull) deeplink;
Copied!
Example
Objective-C
1
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options {
2
[ACPMobileServices trackAdobeDeepLink:url];
3
/*
4
Handle deep link
5
*/
6
return YES;
7
}
Copied!
Swift
1
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
2
ACPMobileServices.trackAdobeDeepLink(url)
3
/*
4
Handle deep link
5
*/
6
return true
7
}
Copied!
In iOS 13 and later, for a scene-based application, use the UISceneDelegate's scene(_:openURLContexts:) method as follows:
Objective-C
1
- (void) scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
2
UIOpenURLContext * urlContext = URLContexts.anyObject;
3
if (urlContext != nil) {
4
[ACPMobileServices trackAdobeDeepLink:url];
5
/*
6
Handle deep link
7
*/
8
}
9
}
Copied!
Swift
1
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
2
guard let urlContexts = URLContexts.first else { return }
3
ACPMobileServices.trackAdobeDeepLink(urlContexts.url)
4
/*
5
Handle deep link
6
*/
7
}
Copied!

Integration with Apple Search Ads (iOS)

The Adobe Experience Platform SDK leverages Apple's Search Ads attribution to attribute app downloads that originate from Search Ads campaigns in the Apple App Store. For more information about Search Ad campaigns, see Apple Search Ads. This optional feature helps you easily measure the effectiveness of your Search Ads app download campaigns by adding a few lines of code to your app.

Implement Search Ads integration

To enable your app for Search Ad attribution, you will need to add the iAd framework