Skip to content

Latest commit

 

History

History
282 lines (228 loc) · 5.8 KB

File metadata and controls

282 lines (228 loc) · 5.8 KB

Migrating to AEPCore reference

This document is a reference comparison of ACPCore (2.x) APIs against their equivalent APIs in AEPCore (3.x).

Primary Classes

Type AEP 3.x (Swift) AEP 3.x (Objective-C) ACP 2.x (Objective-C)
Primary Class MobileCore AEPMobileCore ACPCore
Enum LogLevel AEPLogLevel ACPMobileLogLevel

Core extension APIs

trackAction

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

static func track(action: String?, data: [String: Any]?)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)trackAction:(NSString * _Nullable)action data:(NSDictionary<NSString *, id> * _Nullable)data;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) trackAction: (nullable NSString*) action data: (nullable NSDictionary*) contextData;

{% endtab %} {% endtabs %}

trackState

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

static func track(state: String?, data: [String: Any]?)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)trackState:(NSString * _Nullable)state data:(NSDictionary<NSString *, id> * _Nullable)data;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) trackState: (nullable NSString*) state data: (nullable NSDictionary*) contextData;

{% endtab %} {% endtabs %}

collectPii

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static func collectPii(_ data: [String: Any])

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)collectPii:(NSDictionary<NSString *, id> * _Nonnull)data;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) collectPii: (nonnull NSDictionary<NSString*, NSString*>*) data;

{% endtab %} {% endtabs %}

collectLaunchInfo

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static func collectLaunchInfo(_ userInfo: [String: Any])

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)collectLaunchInfo:(NSDictionary<NSString *, id> * _Nonnull)userInfo;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) collectLaunchInfo: (nonnull NSDictionary*) userInfo;

{% endtab %} {% endtabs %}

getSdkIdentities

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

static func getSdkIdentities(completion: @escaping (String?, Error?) -> Void)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)getSdkIdentities:(void (^ _Nonnull)(NSString * _Nullable, NSError * _Nullable))completion;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) getSdkIdentities: (nullable void (^) (NSString* __nullable content)) callback;
+ (void) getSdkIdentitiesWithCompletionHandler: (nullable void (^) (NSString* __nullable content, NSError* _Nullable error)) completionHandler;

{% endtab %} {% endtabs %}

setLogLevel

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static func setLogLevel(_ level: LogLevel)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)setLogLevel:(enum AEPLogLevel)level;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) setLogLevel: (ACPMobileLogLevel) logLevel;

{% endtab %} {% endtabs %}

registerURLHandler

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

  // Not supported

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

  // Not supported

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) registerURLHandler: (nonnull BOOL (^) (NSString* __nullable url)) callback;

{% endtab %} {% endtabs %}

setAppGroup

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static func setAppGroup(_ group: String?)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)setAppGroup:(NSString * _Nullable)group;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) setAppGroup: (nullable NSString*) appGroup;

{% endtab %} {% endtabs %}

configureWithAppId

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

static func configureWith(appId: String)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)configureWithAppId:(NSString * _Nonnull)appId;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) configureWithAppId: (NSString* __nullable) appid;

{% endtab %} {% endtabs %}

updateConfiguration

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

static func updateConfigurationWith(configDict: [String: Any])

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)updateConfiguration:(NSDictionary<NSString *, id> * _Nonnull)configDict;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) updateConfiguration: (NSDictionary* __nullable) config;

{% endtab %} {% endtabs %}

configureWithFileInPath

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

static func configureWith(filePath: String)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)configureWithFilePath:(NSString * _Nonnull)filePath;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) configureWithFileInPath: (NSString* __nullable) filepath;

{% endtab %} {% endtabs %}

extensionVersion

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static var extensionVersion: String

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (nonnull NSString*) extensionVersion;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (nonnull NSString*) extensionVersion;

{% endtab %} {% endtabs %}

{% hint style="info" %} For additional details see also Mobile Core API reference. {% endhint %}