Git Product home page Git Product logo

aepsdk-edgebridge-ios's Introduction

Adobe Experience Platform Edge Bridge

CocoaPods SPM CircleCI Code Coverage

About this project

The AEP Edge Bridge mobile extension enables forwarding of Analytics track events to Adobe Edge Network when using the Adobe Experience Platform SDK and the Edge Network extension. The configured Data Collection datastream for the mobile application can define a mapping of the track event's contextdata to an XDM schema using Data Prep for Data Collection.

Requirements

  • Xcode 15 (or newer)
  • Swift 5.1 (or newer)

Add Edge Bridge extension to an application

Install extension

These are currently the supported installation options:

# Podfile
use_frameworks!

# for app development, include the following pod
target 'YOUR_TARGET_NAME' do
  pod 'AEPCore'
  pod 'AEPEdge'
	pod 'AEPEdgeBridge'
	pod 'AEPEdgeIdentity'
end

Replace YOUR_TARGET_NAME and then, in the Podfile directory, type:

$ pod install

To add the AEPEdgeBridge 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 AEPEdgeBridge package repository: https://github.com/adobe/aepsdk-edgebridge-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 AEPEdgeBridge directly to your dependencies:

dependencies: [
    .package(url: "https://github.com/adobe/aepsdk-edgebridge-ios.git", .upToNextMajor(from: "5.0.0"))
]

Binaries

To generate an AEPEdgeBridge.xcframework, run the following command:

$ make archive

This generates the xcframework under the build folder. Drag and drop all the .xcframeworks to your app target in Xcode.

Repeat these steps for each of the required depdendencies:

Import and register extension

Swift

// AppDelegate.swift

import AEPCore
import AEPEdge
import AEPEdgeBridge
import AEPEdgeIdentity

...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    MobileCore.registerExtensions([Identity.self,
                                   Edge.self,
                                   EdgeBridge.self], {
    MobileCore.configureWith(appId: "yourEnvironmentFileID")
  })
  ...
}

Objective-C

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

Development

The first time you clone or download the project, you should run the following from the root directory to setup the environment:

make pod-install

Subsequently, you can make sure your environment is updated by running the following:

make pod-update

Open the Xcode workspace

Open the workspace in Xcode by running the following command from the root directory of the repository:

make open

Command line integration

You can run all the test suites from command line:

make test

Documentation

Find further documentation in the Documentation folder.

Related Projects

Project Description
AEPCore Extensions The AEPCore and AEPServices represent the foundation of the Adobe Experience Platform SDK.
AEPEdge Extension The AEPEdge extension allows you to send data to the Adobe Experience Platform (AEP) from a mobile application.
AEP SDK Sample App for iOS Contains iOS sample apps for the AEP SDK. Apps are provided for both Objective-C and Swift implementations.
AEP SDK Sample App for Android Contains Android sample app for the AEP SDK.

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

Security policy

See the SECURITY POLICY for more details.

aepsdk-edgebridge-ios's People

Contributors

addb avatar cacheung avatar emdobrin avatar kevinlind avatar timkimadobe avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aepsdk-edgebridge-ios's Issues

[v5] Update tutorial to use new data format

Task description

For Edge Bridge 5.0, update the tutorial documentation to reference the new data format.
The current tutorial contains screenshots and code snippets which list the deprecated data mapping. Update the screenshots and code snippets to use the new data format.

Additional implementation details or code snippet(s)

See internal wiki "Edge Bridge to Analytics data conversion"
See Epic MOB-20348

Refactor functional tests to use new test utils

Task description

The existing functional tests should be refactored to use the newly available common test utilities available in: https://github.com/adobe/aepsdk-testutils-ios

With the following items covered:

  1. Any changes required to the common test utils should be opened as a PR to the test utils repo, optimally in a non-breaking change manner (although before the 1.0.0 release of the test utils, larger changes should be ok)
  2. Manual dictionary/array property assertions should be refactored to use the JSON comparison tool
  3. Test utilities that exist in the test utils repo should be used over equivalent test util classes defined locally

Additional implementation details or code snippet(s)

No response

[v5] Support app extensions

With the use of UIApplication.shared to set the customer perspective variable, the EdgeBridge class is no longer available to app extensions. Similar to the Analytics extension, fix by creating a new EdgeBridgeAppExtension class which does not use UIApplication.shared and hence does not set cp in the dispatched event.

Set parentId on EdgeBridge events

Task description

  • Set parentID on Edge requests generated based of trackAction/trackState/Rule consequence events
  • Automated testing

[v5] Support new data format

Task description

For Edge Bridge 5.0, support new data format.
Replace the existing data mapping with the new data.__adobe.analytics mapping as defined in the internal wiki "Edge Bridge to Analytics data conversion"

Additional implementation details or code snippet(s)

See internal wiki "Edge Bridge to Analytics data conversion"
See Epic MOB-20348

[v5] Update repo documentation to support new data mapping

Task description

For Edge Bridge 5.0, update repo documentation for new data format. Currently it doesn't appear the repo docs mention the current format, but we can add a new document or section to an existing document which outlines the new mapping.

Additional implementation details or code snippet(s)

See internal wiki "Edge Bridge to Analytics data conversion"
See Epic MOB-20348

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.