Migrating to AEPAnalytics
This document is a reference comparison of AEPAnalytics (3.x) APIs against their equivalent ACPAnalytics (2.x) APIs.
The AEPAnalytics extension is implemented purely in Swift and is compatible with the AEPCore Swift SDK. To ensure a smooth transition from the ACPAnalytics SDK, there are no major changes on the API names or definition. For more details, follow the migration guide below for your Swift or Objective-C mobile application. If explanation beyond showing API differences is necessary, it will be captured as an info hint within that API's section.

AEPAnalytics classes

Type
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Primary Class
Analytics
AEPMobileAnalytics
ACPAnalytics

AEPAnalytics APIs (alphabetical)

clearQueue

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func clearQueue()
Copied!
1
+ (void) clearQueue;
Copied!
1
+ (void) clearQueue;
Copied!

extensionVersion

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static var extensionVersion: String
Copied!
1
+ (nonnull NSString*) extensionVersion;
Copied!
1
+ (nonnull NSString*) extensionVersion;
Copied!

getQueueSize

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func getQueueSize(completion: @escaping (Int, Error?) -> Void)
Copied!
1
+ (void) getQueueSize:^(NSInteger queueSize, NSError * _Nullable error)completion;
Copied!
1
+ (void) getQueueSize: (nonnull void (^) (NSUInteger queueSize)) callback;
2
3
+ (void) getQueueSizeWithCompletionHandler: (nonnull void (^) (NSUInteger queueSize, NSError* __nullable error)) completionHandler;
Copied!

getTrackingIdentifier

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func getTrackingIdentifier(completion: @escaping (String?, Error?) -> Void)
Copied!
1
+ (void) getTrackingIdentifier:^(NSString * _Nullable trackingIdentifier, NSError * _Nullable error)completion;
Copied!
1
+ (void) getTrackingIdentifier: (nonnull void (^) (NSString* __nullable trackingIdentifier)) callback;
2
3
+ (void) getTrackingIdentifierWithCompletionHandler: (nonnull void (^) (NSString* __nullable trackingIdentifier, NSError* __nullable error)) completionHandler;
Copied!

getVisitorIdentifier

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func getVisitorIdentifier(completion: @escaping (String?, Error?) -> Void)
Copied!
1
+ (void) getVisitorIdentifier:^(NSString * _Nullable visitorIdentifier, NSError * _Nullable error)completion;
Copied!
1
+ (void) getVisitorIdentifier: (nonnull void (^) (NSString* __nullable visitorIdentifier)) callback;
2
3
+ (void) getVisitorIdentifierWithCompletionHandler: (nonnull void (^) (NSString* __nullable visitorIdentifier, NSError* __nullable error)) completionHandler;
Copied!

sendQueuedHits

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func sendQueuedHits()
Copied!
1
+ (void) sendQueuedHits;
Copied!
1
+ (void) sendQueuedHits;
Copied!

setVisitorIdentifier

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func setVisitorIdentifier(visitorIdentifier: String)
Copied!
1
+ (void) setVisitorIdentifier:(NSString * _Nonnull) visitorIdentifier;
Copied!
1
+ (void) setVisitorIdentifier: (nonnull NSString*) visitorIdentifier;
Copied!
Last modified 1mo ago