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.
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 |
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func clearPrefetchCache()
+ (void) clearPrefetchCache;
+ (void) clearPrefetchCache;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func clickedLocation(_ name: String, targetParameters: TargetParameters? = nil)
+ (void) clickedLocation: (NSString* _NonNull) name
withTargetParameters: (AEPTargetParameters* _Nullable) targetParameters;
+ (void) locationClickedWithName: (nonnull NSString*) name
targetParameters: (nullable ACPTargetParameters*) parameters;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static var extensionVersion: String
+ (nonnull NSString*) extensionVersion;
+ (nonnull NSString*) extensionVersion;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func getThirdPartyId(_ completion: @escaping (String?, Error?) -> Void)
+ (void) getThirdPartyId: (nonnull void (^) (NSString* _Nullable thirdPartyId, NSError* _Nullable error)) completion;
+ (void) getThirdPartyId: (nonnull void (^) (NSString* __nullable thirdPartyId)) callback;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func getTntId(_ completion: @escaping (String?, Error?) -> Void)
+ (void) getTntId: (nonnull void (^) (NSString* _Nullable tntId, NSError* _Nullable error)) completion;
+ (void) getTntId: (nonnull void (^) (NSString* __nullable tntId)) callback;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func prefetchContent(_ prefetchArray: [TargetPrefetch], with targetParameters: TargetParameters? = nil, _ completion: ((Error?) -> Void)?)
+ (void) prefetchContent: (NSArray<AEPTargetPrefetchObject*>* _NonNull) prefetchArray
withParameters: (AEPTargetParameters* _Nullable) targetParameters
callback: (nullable void (^) (NSError* _Nullable error)) completion;
+ (void) prefetchContent: (nonnull NSArray<ACPTargetPrefetchObject*>*) prefetchObjectArray
withParameters: (nullable ACPTargetParameters*) parameters
callback: (nullable void (^) (NSError* _Nullable error)) callback;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Registration occurs by passing
Target
to the MobileCore.registerExtensions
API.MobileCore.registerExtensions([Target.self])
Registration occurs by passing
AEPMobileTarget
to the [AEPMobileCore registerExtensions:completion:]
API.[AEPMobileCore registerExtensions:@[AEPMobileTarget.class] completion:nil];
[ACPTarget registerExtension];
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func retrieveLocationContent(_ requestArray: [TargetRequest], with targetParameters: TargetParameters? = nil)
(void) retrieveLocationContent: (NSArray<AEPTargetRequestObject*>* _NonNull) requestsArray
withParameters: (AEPTargetParameters* _Nullable) targetParameters;
+ (void) retrieveLocationContent: (nonnull NSArray<ACPTargetRequestObject*>*) requests
withParameters: (nullable ACPTargetParameters*) parameters;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func setPreviewRestartDeepLink(_ deeplink: URL)
+ (void) setPreviewRestartDeeplink: (NSURL* _NonNull) deeplink;
+ (void) setPreviewRestartDeeplink: (nonnull NSURL*) deeplink;
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
static func setThirdPartyId(_ id: String?)
+ (void) setThirdPartyId: (NSString* _Nullable) thirdPartyId;
+ (void) setThirdPartyId: (nullable NSString*) thirdPartyId;
Last modified 4mo ago