Skip to content

Latest commit

 

History

History
156 lines (120 loc) · 5.81 KB

getting-started.md

File metadata and controls

156 lines (120 loc) · 5.81 KB

Getting started

The Adobe Experience Platform Media for Edge Network mobile extension has the following dependencies, which must be installed prior to installing the extension:

Configuration

Configure Dependencies

Configure the Edge, EdgeIdentity extensions in the mobile property using the Data Collection UI.

Note If this is your first time setting up Edge extensions and using Data Collection UI, please follow this tutorial to learn about Adobe Experience Platform and how to setup required schemas, datasets, datastreams and creating mobile property etc.


Configure AEPEdgeMedia extension

Currently AEPEdgeMedia doesn't have a Data Collection extension and needs to be configured programmatically.

Configuration Keys

Name Key Value Required
Channel "edgemedia.channel" String Yes
Player Name "edgemedia.playerName" String Yes
Application Version "edgemedia.appVersion" String No
Swift
let mediaConfiguration = [String: Any]()
mediaConfiguration ["edgemedia.channel"] = "<YOUR_CHANNEL_NAME>"
mediaConfiguration ["edgemedia.playerName"] = "<YOUR_PLAYER_NAME>"
mediaConfiguration ["edgemedia.channel"]  = "<YOUR_APP_VERSION>"

MobileCore.updateConfigurationWith(configDict: mediaConfiguration)
Objective-C
NSMutableDictionary* mediaConfiguration = [NSMutableDictionary dictionary];
config["edgemedia.channel"] = @"<YOUR_CHANNEL_NAME>";
config["edgemedia.playerName"] = @"<YOUR_PLAYER_NAME>";
config["edgemedia.appVersion"] = @"<YOUR_APP_VERSION>";

[AEPMobileCore updateConfiguration:mediaConfiguration];

Add the AEPEdgeMedia extension to your app

Download AEPEdgeMedia extension

Note The following instructions are for setting up an application using Adobe Experience Platform Edge Network mobile extensions. If an application will include both Edge Network and Adobe Solution extensions, both the Identity for Edge Network and Identity for Experience Cloud ID Service extensions are required. For more details, see the Frequently Asked Questions page.

Add the AEPEdgeMedia and other dependency extensions to your project:

Note Try to use the latest extension versions to have access to all our latest features and fixes.

Using Cocoapods

  1. Add following pods in your Podfile:
use_frameworks!
target 'YourTargetApp' do
   pod 'AEPCore'
   pod 'AEPEdge'
   pod 'AEPEdgeIdentity'
   pod 'AEPEdgeMedia'
end
  1. Replace the target (YourTargetApp) with your actual app target name.

  2. Install the pod dependencies by typing the following command in your Podfile directory:

$ pod install

To add the AEPEdgeMedia Package to your application, from the Xcode menu select:

File > Add Packages...

Note The menu options may vary depending on the version of Xcode being used.

Enter the URL for the AEPMedia package repository: https://github.com/adobe/aepsdk-edgemedia-ios.git.

When prompted, input a specific version or a range of versions for Version rule.

Alternatively, if your project has a Package.swift file, you can add AEPEdgeMedia directly to your dependencies:

dependencies: [
  .package(url: "https://github.com/adobe/aepsdk-edge-ios.git", .upToNextMajor(from: "1.4.0")),
  .package(url: "https://github.com/adobe/aepsdk-edgeidentity-ios.git", .upToNextMajor(from: "1.0.0")),
  .package(url: "https://github.com/adobe/aepsdk-edgemedia-ios.git", .upToNextMajor(from: "1.0.0-beta-1"))
]

Using Binaries

Run make archive from the root directory to generate .xcframeworks for each module under the build folder. Drag and drop all .xcframeworks to your app target in Xcode.


Import the AEPEdgeMedia along with the dependencies and register the extensions with MobileCore:

Swift

// AppDelegate.swift
import AEPCore
import AEPEdge
import AEPEdgeIdentity
import AEPEdgeMedia
// AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  MobileCore.registerExtensions([Edge.self, Identity.self, Media.self], {
     MobileCore.configureWith(appId: "yourEnvironmentID")
      // Configure EdgeMedia extension
      let mediaConfiguration: [String: Any] = [
                                                "edgemedia.channel": "<YOUR_CHANNEL_NAME>", 
                                                "edgemedia.playerName": "<YOUR_PLAYER_NAME>", 
                                                "edgemedia.appVersion": "<YOUR_APP_VERSION>"
                                              ]
      MobileCore.updateConfigurationWith(configDict: mediaConfiguration)
   })
   ...
}

Objective-C

// AppDelegate.h
@import AEPCore;
@import AEPEdge;
@import AEPEdgeIdentity;
@import AEPEdgeMedia;
// AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [AEPMobileCore registerExtensions:@[AEPMobileEdge.class, AEPMobileEdgeIdentity.class, AEPMobileEdgeMedia.class] completion:^{
    ...
  }];
  [AEPMobileCore configureWithAppId: @"yourEnvironmentID"];
  ...
}