Adobe Launch iOS SDK
Add the power of Branch deep linking and attribute to your Adobe Marketing Cloud app. With Branch's linking platform, mobile developers and marketers can grow their mobile business with world class deep linking and attribution.
Features
- All events tracked with the Adobe SDK will automatically be sent to Branch without any extra work
- All core Branch functionality is accessible
- The SDK will automatically pick up the Adobe ID's
Requirements
- iOS 10+
- Adobe Core Platform
iOS 14 Compatible
In order to give you full control over the user experience, the Branch SDK will not trigger the IDFA permission modal.
However, we will still collect and use IDFAs when available if you do choose to trigger the modal.
Branch SDK not Required
As the Adobe Branch extension is a wrapper that auto includes a sub-dependency for the Branch SDK, you do not need to - nor do we recommend to - implement the Branch SDK separately in your app.
Example Apps
An example app can be found in the AdobeBranchExtension-iOS repository, in the Examples/AdobeBranchExample
project.
Installation & Usage
Note that the Adobe Experience Platform (AEP) SDK and AdobeMobileLibrary cannot coexist in the same project.
Here's a brief outline of how to use the AdobeBranchExtension in your app:
- You'll need to configure your app and get a Branch API key in the Branch Metrics dashboard. You can read more about configuring your dashboard in the Branch docs here.
- For deep linking, you'll need to add associated domains for universal links as described in the Branch docs here:
- Also add an app URI scheme and your Branch key to the plist file for you app for deep linking.
- In the Adobe dashboard, activate Branch and add your Branch key to your app's configuration.

- Add the AdobeBranchExtension to your app's Podfile.
pod 'AdobeBranchExtension'
- Run
pod install
andpod update
do install the latest version of the extension. - Register the Branch
AdobeBranchExtension
withACPCore
indidFinishLaunchingWithOptions
:
#import <AdobeBranchExtension/AdobeBranchExtension.h>
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
...
// Register the Branch AdobeBranchExtension with APCCore
[ACPCore registerExtension:[AdobeBranchExtension class] error:&error]
...
return YES; // Important! If you return `NO` iOS will not handle deep linking as expected.
}
- Add the Branch deep link routers and receivers in your AppDelegate class in three places as shown below. You can see some best practices on deep link routing in this doc.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Up here you register your AdobeBranchExtension with ACPCore
// Handle your Branch deep link routing in the callback
[AdobeBranchExtension initSessionWithLaunchOptions:launchOptions
andRegisterDeepLinkHandler:^(NSDictionary * _Nullable params, NSError * _Nullable error) {
if (!error && params && [params[@"+clicked_branch_link"] boolValue]) {
// EXAMPLE ROUTING CODE
// Product*product = Product.new;
// product.name = params[@"$og_title"];
// product.summary = params[@"$og_description"];
// product.URL = params[@"$canonical_url"];
// product.imageName = params[@"image_name];
// product.imageURL = params[@"$og_image_url"];
//
// ProductViewController *pvc = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ProductViewController"];
// pvc.title = product.name;
// pvc.product = product;
// [((UINavigationController *)self.window.rootViewController) pushViewController:pvc animated:YES];
}
}];
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
[AdobeBranchExtension application:application openURL:url options:options];
return YES;
}
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray<id<UIUserActivityRestoring>> * __nullable restorableObjects))restorationHandler {
[AdobeBranchExtension application:application continueUserActivity:userActivity];
return YES;
}
NativeLink™ Deferred Deep Linking (iOS Only)
- Use iOS pasteboard to enable deferred deep linking via Branch NativeLink™
Prerequisites
Make sure the underlying iOS SDK Version is v1.39.4+
To use this feature you must:
- Enable NativeLink™ Deep Linking in the Branch Dashboard Configuration tab
or- Manually configure your Branch Link to use
$ios_nativelink
Implement one of the pasteboard opt-in options in the native iOS SDK code.
Implementing Branch Features
Once you've added the AdobeBranchExtension and Branch, you can always use Branch features directly. You can learn about using the Branch features here, in the Branch documentation for iOS.
Register ACPCore
ACPCore
There are two ways to register with ACPCore
:
- Access the hosted Adobe config by directly passing in the App ID:
// Option 1 - Access the Hosted Adobe Config by directly passing the Adobe App ID
[ACPCore configureWithAppId:@"replacewithyouradobeappid"];
- Configuring at runtime by updating the
APCCore
configuration:
//Option 2 - Configure at runtime
- (void) setupTestConfig {
NSMutableDictionary *config = [NSMutableDictionary dictionary];
// ============================================================
// global
// ============================================================
config[@"global.privacy"] = @"optedin";
config[@"global.ssl"] = @true;
// ============================================================
// Branch
// ============================================================
config[@"branchKey"] = @"replacewithyourbranchkey";
// ============================================================
// acquisition
// ============================================================
config[@"acquisition.appid"] = @"";
config[@"acquisition.server"] = @"";
config[@"acquisition.timeout"] = @0;
// ============================================================
// analytics
// ============================================================
config[@"analytics.aamForwardingEnabled"] = @false;
config[@"analytics.batchLimit"] = @0;
config[@"analytics.offlineEnabled"] = @true;
config[@"analytics.rsids"] = @"";
config[@"analytics.server"] = @"";
config[@"analytics.referrerTimeout"] = @0;
// ============================================================
// audience manager
// ============================================================
config[@"audience.server"] = @"";
config[@"audience.timeout"] = @0;
// ============================================================
// identity
// ============================================================
config[@"experienceCloud.server"] = @"";
config[@"experienceCloud.org"] = @"";
config[@"identity.adidEnabled"] = @false;
// ============================================================
// target
// ============================================================
config[@"target.clientCode"] = @"";
config[@"target.timeout"] = @0;
// ============================================================
// lifecycle
// ============================================================
config[@"lifecycle.sessionTimeout"] = @0;
config[@"lifecycle.backdateSessionInfo"] = @false;
// ============================================================
// rules engine
// ============================================================
config[@"rules.url"] = @"pathtoyourrulesfile";
config[@"com.branch.extension/deepLinkKey"] = @"pictureId";
config[@"deepLinkKey"] = @"pictureId";
[ACPCore updateConfiguration:config];
}
Register an Event Allowlist
Selectively track certain events within Branch by registering a allowlist:
AdobeBranchExtension.configureEventTypes(["com.adobe.eventType.generic.track"],andEventSources:["com.adobe.eventSource.requestContent"])
[AdobeBranchExtension configureEventTypes:"com.adobe.eventType.generic.track" andEventSources:"com.adobe.eventSource.requestContent"];
Events can be allowlisted based on their event type and event source. The event type and event source can be defined using the following code snippet:
let event = try! ACPExtensionEvent(name: "event_name", type: "io.branch.type", source: "io.branch.source", data: [])
try! ACPCore.dispatchEvent(event)
Disable Event Sharing between Adobe/Branch
To disable Event Sharing between Adobe and Branch, add the following line of code:
// Disable event sharing
[AdobeBranchExtension configureEventTypes:nil andEventSources:nil];
// Disable event sharing
[AdobeBranchExtension configureEventTypes:nil andEventSources:nil];
Automatic: Track Action and State
When you track actions and states in Adobe Launch, the action and state messages are sent to Branch too and shown on the Branch dashboards. This allows you to track the effectiveness of deep link campaigns and viral sharing in your app's actions.
Here's an example of tracking app state via Adobe Launch:
[ACPCore trackState:@"VIEW" data:@{
@"name": self.product.name,
@"revenue": @"200.0",
@"currency": @"USD"
}];
Define the Exclusion List of Event Names
Conflict
You can either define an exclusion list or an allow list of events but you can't define both. If you don't configure any, all events will send to Branch, which is not ideal.
// Define the Exclustion List of Event Names
if ([AdobeBranchExtension configureEventExclusionList:@[@"VIEW"] error:&error]) {
NSLog(@"AdobeBranchExtension AllowList configured");
} else {
NSLog(@"%@", error);
}
Define an Allow List of Event Names
Conflict
You can either define an allow list or an exclusion list of events but you can't define both. If you don't configure any, all events will send to Branch, which is not ideal.
// Define the Allow List of Event Names
if ([AdobeBranchExtension configureEventAllowList:@[@"VIEW"] error:&error]) {
NSLog(@"AdobeBranchExtension AllowList configured");
} else {
NSLog(@"%@", error);
}
Register AdobeBranchExtension
Once the Allow or Exclusion list of event names has been configured, the AdobeBranchExtension
needs to be registered.
// register AdobeBranchExtension
if ([ACPCore registerExtension:[AdobeBranchExtension class] error:&error]) {
NSLog(@"AdobeBranchExtension Registered");
} else {
NSLog(@"%@", error);
}
Updated 4 months ago