This extension enables capabilities for Project Griffon.
{% hint style="info" %} Project Griffon is a beta product. To use it, you must accept the terms on https://experience.adobe.com/griffon. {% endhint %}
To get started with Project Griffon in your app, you'll need to:
- Install the AEP Assurance extension in Experience Platform Launch
- Add AEP Assurance SDK extension library to your app
- Import AEP Assurance into your app
- Register and implement extension APIs
Follow these steps to add the install the extension in Experience Platform Launch:
- In Experience Platform Launch, click the Extensions tab.
- On the Catalog tab, locate the AEP Assurance extension, and click Install.
- Follow the publishing process to update SDK configuration.
{% tabs %} {% tab title="Android" %} Java
-
Add the following libraries in your project's
build.gradlefile:implementation 'com.adobe.marketing.mobile:core:1+' implementation 'com.adobe.marketing.mobile:assurance:1+'
-
Import the Project Griffon libraries with the other SDK libraries:
import com.adobe.marketing.mobile.Assurance; import com.adobe.marketing.mobile.MobileCore;
{% endtab %}
{% tab title="iOS" %}
Add the library to your project via your Cocoapods Podfile
pod 'ACPCore'
pod 'AEPAssurance'
Import the Project Griffon libraries along with other SDK libraries:
#import "ACPCore.h"
#import "AEPAssurance.h" // <-- import the AEPAssurance libraryimport ACPCore
import AEPAssurance // <-- import the AEPAssurance library{% endtab %}
{% tab title="React Native" %}
-
Install AEP Assurance.
npm install @adobe/react-native-aepassurance
1.1 Link
- React Native 0.60+
CLI autolink feature links the module while building the app.
- React Native <= 0.59
react-native link @adobe/react-native-aepassuranceNote For iOS using cocoapods, run:
cd ios/ && pod install-
Import the extension.
import {AEPAssurance} from '@adobe/react-native-aepassurance';
-
Get the extension version.
AEPAssurance.extensionVersion().then(version => console.log("AdobeExperienceSDK: AEPAssurance version: " + version));
{% endtab %}
{% tab title="Flutter" %}
-
Install AEP Assurance.
Flutter install instructions for AEP Assurance can be found here.
-
Import the extension.
import 'package:flutter_assurance/flutter_assurance.dart';
-
Get the extension version.
String version = await FlutterAEPAssurance.extensionVersion;
{% endtab %}
{% tab title="Cordova" %}
-
After creating your Cordova app and adding the Android and iOS platforms, the AEPAssurance extension for Cordova can be added with this command:
cordova plugin add https://github.com/adobe/cordova-aepassurance.git -
Get the extension version.
AEPAssurance.extensionVersion(function(version) { console.log("AEPAssurance version: " + version); }, function(error) { console.log(error); });
{% endtab %}
{% tab title="Unity" %}
-
After importing the AEPAssurance.unitypackage, the AEP Assurance extension for Unity can be added with the following code in the MainScript:
using com.adobe.marketing.mobile;
-
Get the extension version.
AEPAssurance.extensionVersion();
{% endtab %}
{% tab title="Xamarin" %}
-
After adding the iOS or Android AEP Assurance NuGet package, the Assurance extension can be added by this import statement:
using Com.Adobe.Marketing.Mobile; -
Get the extension version.
AEPAssurance.ExtensionVersion();
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="Android" %} Registering the extension with Core, sends Experience Platform SDK events to an active Project Griffon session. To start using the extension library, you must first register the extension with the Mobile Core extension.
-
Register the extension when you register other extensions.
public class MobileApp extends Application { @Override public void onCreate() { super.onCreate(); MobileCore.setApplication(this); MobileCore.configureWithAppId("yourAppId"); try { Assurance.registerExtension(); MobileCore.start(null); } catch (Exception e) { // Log the exception } } }
{% endtab %}
{% tab title="iOS" %} Registering the extension with Core sends Experience Platform SDK events to an active Project Griffon session. To start using the extension library, you must first register the extension with the Mobile Core extension.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPCore configureWithAppId:@"yourAppId"];
[AEPAssurance registerExtension]; // <-- register AEPAssurance with Core
[ACPCore start:nil];
// Override point for customization after application launch.
return YES;
}func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ACPCore.configure(withAppId: "yourAppId")
AEPAssurance.registerExtension() // <-- register AEPAssurance with Core
ACPCore.start(nil)
// Override point for customization after application launch.
return true;
}{% endtab %}
{% tab title="React Native" %}
When using React Native, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs. {% endtab %}
{% tab title="Flutter" %}
When using Flutter, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs. {% endtab %}
{% tab title="Cordova" %}
When using Cordova, register AEP Assurance with Mobile Core in native code as shown on the Android and iOS tabs. {% endtab %}
{% tab title="Unity" %}
Register the extension in the start() function:
using com.adobe.marketing.mobile;
using using AOT;
public class MainScript : MonoBehaviour
{
[MonoPInvokeCallback(typeof(AdobeStartCallback))]
public static void HandleStartAdobeCallback()
{
ACPCore.ConfigureWithAppID("yourAppId");
}
// Start is called before the first frame update
void Start()
{
AEPAssurance.registerExtension();
ACPCore.Start(HandleStartAdobeCallback);
}
}{% endtab %}
{% tab title="Xamarin" %} iOS
Register the AEPAssurance extension in your app's FinishedLaunching() function:
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
AEPAssurance.RegisterExtension();
// start core
ACPCore.Start(startCallback);
return base.FinishedLaunching(app, options);
}
private void startCallback()
{
// set launch config
ACPCore.ConfigureWithAppID("yourAppId");
}Android
Register the AEPAssurance extension in your app's OnCreate() function:
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
AEPAssurance.RegisterExtension();
// start core
ACPCore.Start(new CoreStartCompletionCallback());
}
class CoreStartCompletionCallback : Java.Lang.Object, IAdobeCallback
{
public void Call(Java.Lang.Object callback)
{
// set launch config
ACPCore.ConfigureWithAppID("yourAppId");
}
}{% endtab %} {% endtabs %}
The startSession API needs to be called to begin a Project Griffon session. When called, SDK displays a PIN authentication overlay to begin a session.
{% hint style="info" %} You may call this API when the app launches with a url (see code snippet below for sample usage) {% endhint %}
{% tabs %} {% tab title="iOS" %}
+ (void) startSession: (NSURL* _Nonnull) url;- (BOOL)application:(UIApplication *)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
[AEPAssurance startSession:url];
return false;
}In iOS 13 and later, for a scene-based application, use the UISceneDelegate's scene(_:openURLContexts:) method as follows:
- (void) scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
UIOpenURLContext * urlContext = URLContexts.anyObject;
if (urlContext != nil) {
[AEPAssurance startSession:urlContext.URL];
}
}func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
do {
AEPAssurance.startSession(url)
return false
}
}In iOS 13 and later, for a scene-based application, use the UISceneDelegate's scene(_:openURLContexts:) method as follows:
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
AEPAssurance.startSession((URLContexts.first!).url)
}{% endtab %} {% endtabs %}
