Migrating to AEPTarget reference
This document is a reference comparison of AEPTarget(3.x) APIs against their equivalent ACPTarget (2.x) APIs for an iOS mobile application implementation.
The AEPTarget extension is implemented purely in Swift and is compatible with the AEPCore swift SDK. To ensure a smooth transition from the ACPTarget 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.

Public classes

Type
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Primary Class (Module)
Target
AEPMobileTarget
ACPTarget
Class
TargetRequest
AEPTargetRequestObject
ACPTargetRequestObject
Class
TargetPrefetch
AEPTargetPrefetchObject
ACPTargetPrefetchObject
Class
TargetOrder
AEPTargetOrder
ACPTargetOrder
Class
TargetParameters
AEPTargetParameters
ACPTargetParameters
Class
TargetProduct
AEPTargetProduct
ACPTargetProduct

Public APIs

clearPrefetchCache

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

clickedLocation

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func clickedLocation(_ name: String, targetParameters: TargetParameters? = nil)
Copied!
1
+ (void) clickedLocation: (NSString* _NonNull) name
2
withTargetParameters: (AEPTargetParameters* _Nullable) targetParameters;
Copied!
1
+ (void) locationClickedWithName: (nonnull NSString*) name
2
targetParameters: (nullable ACPTargetParameters*) parameters;
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!

getThirdPartyId

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

getTntId

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

prefetchContent

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func prefetchContent(_ prefetchArray: [TargetPrefetch], with targetParameters: TargetParameters? = nil, _ completion: ((Error?) -> Void)?)
Copied!
1
+ (void) prefetchContent: (NSArray<AEPTargetPrefetchObject*>* _NonNull) prefetchArray
2
withParameters: (AEPTargetParameters* _Nullable) targetParameters
3
callback: (nullable void (^) (NSError* _Nullable error)) completion;
Copied!
1
+ (void) prefetchContent: (nonnull NSArray<ACPTargetPrefetchObject*>*) prefetchObjectArray
2
withParameters: (nullable ACPTargetParameters*) parameters
3
callback: (nullable void (^) (NSError* _Nullable error)) callback;
Copied!

registerExtension

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Registration occurs by passing Target to the MobileCore.registerExtensions API.
1
MobileCore.registerExtensions([Target.self])
Copied!
Registration occurs by passing AEPMobileTarget to the [AEPMobileCore registerExtensions:completion:] API.
1
[AEPMobileCore registerExtensions:@[AEPMobileTarget.class] completion:nil];
Copied!
1
[ACPTarget registerExtension];
Copied!

retrieveLocationContent

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func retrieveLocationContent(_ requestArray: [TargetRequest], with targetParameters: TargetParameters? = nil)
Copied!
1
(void) retrieveLocationContent: (NSArray<AEPTargetRequestObject*>* _NonNull) requestsArray
2
withParameters: (AEPTargetParameters* _Nullable) targetParameters;
Copied!
1
+ (void) retrieveLocationContent: (nonnull NSArray<ACPTargetRequestObject*>*) requests
2
withParameters: (nullable ACPTargetParameters*) parameters;
Copied!
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func setPreviewRestartDeepLink(_ deeplink: URL)
Copied!
1
+ (void) setPreviewRestartDeeplink: (NSURL* _NonNull) deeplink;
Copied!
1
+ (void) setPreviewRestartDeeplink: (nonnull NSURL*) deeplink;
Copied!

setThirdPartyId

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func setThirdPartyId(_ id: String?)
Copied!
1
+ (void) setThirdPartyId: (NSString* _Nullable) thirdPartyId;
Copied!
1
+ (void) setThirdPartyId: (nullable NSString*) thirdPartyId;
Copied!
Last modified 3mo ago