Migrating to AEPAnalytics reference
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
clearQueue
AEP 3.x (Swift)
Copied to your clipboardstatic func clearQueue()
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) clearQueue;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) clearQueue;
Copied to your clipboardstatic func clearQueue()
Copied to your clipboard+ (void) clearQueue;
Copied to your clipboard+ (void) clearQueue;
extensionVersion
AEP 3.x (Swift)
Copied to your clipboardstatic var extensionVersion: String
AEP 3.x (Objective-C)
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
ACP 2.x (Objective-C)
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
Copied to your clipboardstatic var extensionVersion: String
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
getQueueSize
AEP 3.x (Swift)
Copied to your clipboardstatic func getQueueSize(completion: @escaping (Int, Error?) -> Void)
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) getQueueSize:^(NSInteger queueSize, NSError * _Nullable error)completion;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) getQueueSize: (nonnull void (^) (NSUInteger queueSize)) callback;+ (void) getQueueSizeWithCompletionHandler: (nonnull void (^) (NSUInteger queueSize, NSError* __nullable error)) completionHandler;
Copied to your clipboardstatic func getQueueSize(completion: @escaping (Int, Error?) -> Void)
Copied to your clipboard+ (void) getQueueSize:^(NSInteger queueSize, NSError * _Nullable error)completion;
Copied to your clipboard+ (void) getQueueSize: (nonnull void (^) (NSUInteger queueSize)) callback;+ (void) getQueueSizeWithCompletionHandler: (nonnull void (^) (NSUInteger queueSize, NSError* __nullable error)) completionHandler;
getTrackingIdentifier
AEP 3.x (Swift)
Copied to your clipboardstatic func getTrackingIdentifier(completion: @escaping (String?, Error?) -> Void)
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) getTrackingIdentifier:^(NSString * _Nullable trackingIdentifier, NSError * _Nullable error)completion;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) getTrackingIdentifier: (nonnull void (^) (NSString* __nullable trackingIdentifier)) callback;+ (void) getTrackingIdentifierWithCompletionHandler: (nonnull void (^) (NSString* __nullable trackingIdentifier, NSError* __nullable error)) completionHandler;
Copied to your clipboardstatic func getTrackingIdentifier(completion: @escaping (String?, Error?) -> Void)
Copied to your clipboard+ (void) getTrackingIdentifier:^(NSString * _Nullable trackingIdentifier, NSError * _Nullable error)completion;
Copied to your clipboard+ (void) getTrackingIdentifier: (nonnull void (^) (NSString* __nullable trackingIdentifier)) callback;+ (void) getTrackingIdentifierWithCompletionHandler: (nonnull void (^) (NSString* __nullable trackingIdentifier, NSError* __nullable error)) completionHandler;
getVisitorIdentifier
AEP 3.x (Swift)
Copied to your clipboardstatic func getVisitorIdentifier(completion: @escaping (String?, Error?) -> Void)
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) getVisitorIdentifier:^(NSString * _Nullable visitorIdentifier, NSError * _Nullable error)completion;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) getVisitorIdentifier: (nonnull void (^) (NSString* __nullable visitorIdentifier)) callback;+ (void) getVisitorIdentifierWithCompletionHandler: (nonnull void (^) (NSString* __nullable visitorIdentifier, NSError* __nullable error)) completionHandler;
Copied to your clipboardstatic func getVisitorIdentifier(completion: @escaping (String?, Error?) -> Void)
Copied to your clipboard+ (void) getVisitorIdentifier:^(NSString * _Nullable visitorIdentifier, NSError * _Nullable error)completion;
Copied to your clipboard+ (void) getVisitorIdentifier: (nonnull void (^) (NSString* __nullable visitorIdentifier)) callback;+ (void) getVisitorIdentifierWithCompletionHandler: (nonnull void (^) (NSString* __nullable visitorIdentifier, NSError* __nullable error)) completionHandler;
sendQueuedHits
AEP 3.x (Swift)
Copied to your clipboardstatic func sendQueuedHits()
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) sendQueuedHits;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) sendQueuedHits;
Copied to your clipboardstatic func sendQueuedHits()
Copied to your clipboard+ (void) sendQueuedHits;
Copied to your clipboard+ (void) sendQueuedHits;
setVisitorIdentifier
AEP 3.x (Swift)
Copied to your clipboardstatic func setVisitorIdentifier(visitorIdentifier: String)
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) setVisitorIdentifier:(NSString * _Nonnull) visitorIdentifier;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) setVisitorIdentifier: (nonnull NSString*) visitorIdentifier;
Copied to your clipboardstatic func setVisitorIdentifier(visitorIdentifier: String)
Copied to your clipboard+ (void) setVisitorIdentifier:(NSString * _Nonnull) visitorIdentifier;
Copied to your clipboard+ (void) setVisitorIdentifier: (nonnull NSString*) visitorIdentifier;