Migrating to AEPAudience reference
This document is a reference comparison of AEPAudience (3.x) APIs against their equivalent ACPAudience (2.x) APIs.
The AEPAudience extension is implemented purely in Swift and is compatible with the AEPCore Swift SDK. To ensure a smooth transition from the ACPAudience 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.
AEPAudience classes
Type | AEP 3.x (Swift) | AEP 3.x (Objective-C) | ACP 2.x (Objective-C) |
---|---|---|---|
Primary Class | Audience | AEPMobileAudience | ACPAudience |
AEPAudience APIs
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;
getVisitorProfile
AEP 3.x (Swift)
Copied to your clipboardstatic func getVisitorProfile(completion: @escaping ([String: String]?, Error?) -> Void)
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) getVisitorProfile:^(NSDictionary<NSString *,NSString *> * _Nullable visitorProfile, NSError * _Nullable error)completion
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) getVisitorProfile:^(NSDictionary * _Nullable visitorProfile) callback;+ (void) getVisitorProfileWithCompletionHandler:^(NSDictionary * _Nullable visitorProfile, NSError * _Nullable error) completionHandler;
Copied to your clipboardstatic func getVisitorProfile(completion: @escaping ([String: String]?, Error?) -> Void)
Copied to your clipboard+ (void) getVisitorProfile:^(NSDictionary<NSString *,NSString *> * _Nullable visitorProfile, NSError * _Nullable error)completion
Copied to your clipboard+ (void) getVisitorProfile:^(NSDictionary * _Nullable visitorProfile) callback;+ (void) getVisitorProfileWithCompletionHandler:^(NSDictionary * _Nullable visitorProfile, NSError * _Nullable error) completionHandler;
reset
AEP 3.x (Swift)
Copied to your clipboardstatic func reset()
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) reset;
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) reset;
Copied to your clipboardstatic func reset()
Copied to your clipboard+ (void) reset;
Copied to your clipboard+ (void) reset;
signalWithData
AEP 3.x (Swift)
Copied to your clipboardstatic func signalWithData(data: [String: String], completion: @escaping ([String: String]?, Error?) -> Void)
AEP 3.x (Objective-C)
Copied to your clipboard+ (void) signalWithData:(NSDictionary<NSString *,NSString *> * _Nonnull data) completion:^(NSDictionary<NSString *,NSString *> * _Nullable vistorProfile, NSError * _Nullable error)completion
ACP 2.x (Objective-C)
Copied to your clipboard+ (void) signalWithData: (NSDictionary<NSString *, NSString *> * _Nullable) datacallback:^(NSDictionary* _Nullable visitorProfile) callback;+ (void) signalWithData: (NSDictionary<NSString *, NSString *> * _Nonnull) datawithCompletionHandler:^(NSDictionary * _Nullable visitorProfile, NSError * _Nullable error) completionHandler;
Copied to your clipboardstatic func signalWithData(data: [String: String], completion: @escaping ([String: String]?, Error?) -> Void)
Copied to your clipboard+ (void) signalWithData:(NSDictionary<NSString *,NSString *> * _Nonnull data) completion:^(NSDictionary<NSString *,NSString *> * _Nullable vistorProfile, NSError * _Nullable error)completion
Copied to your clipboard+ (void) signalWithData: (NSDictionary<NSString *, NSString *> * _Nullable) datacallback:^(NSDictionary* _Nullable visitorProfile) callback;+ (void) signalWithData: (NSDictionary<NSString *, NSString *> * _Nonnull) datawithCompletionHandler:^(NSDictionary * _Nullable visitorProfile, NSError * _Nullable error) completionHandler;