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 an 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
Copied to your clipboardstatic func clearPrefetchCache()
Copied to your clipboard+ (void) clearPrefetchCache;
Copied to your clipboard+ (void) clearPrefetchCache;
Copied to your clipboardstatic func clearPrefetchCache()
Copied to your clipboard+ (void) clearPrefetchCache;
Copied to your clipboard+ (void) clearPrefetchCache;
clickedLocation
Copied to your clipboardstatic func clickedLocation(_ name: String, targetParameters: TargetParameters? = nil)
Copied to your clipboard+ (void) clickedLocation: (NSString* _NonNull) namewithTargetParameters: (AEPTargetParameters* _Nullable) targetParameters;
Copied to your clipboard+ (void) locationClickedWithName: (nonnull NSString*) nametargetParameters: (nullable ACPTargetParameters*) parameters;
Copied to your clipboardstatic func clickedLocation(_ name: String, targetParameters: TargetParameters? = nil)
Copied to your clipboard+ (void) clickedLocation: (NSString* _NonNull) namewithTargetParameters: (AEPTargetParameters* _Nullable) targetParameters;
Copied to your clipboard+ (void) locationClickedWithName: (nonnull NSString*) nametargetParameters: (nullable ACPTargetParameters*) parameters;
extensionVersion
Copied to your clipboardstatic var extensionVersion: String
Copied to your clipboard+ (nonnull NSString*) extensionVersion;
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;
getThirdPartyId
Copied to your clipboardstatic func getThirdPartyId(_ completion: @escaping (String?, Error?) -> Void)
Copied to your clipboard+ (void) getThirdPartyId: (nonnull void (^) (NSString* _Nullable thirdPartyId, NSError* _Nullable error)) completion;
Copied to your clipboard+ (void) getThirdPartyId: (nonnull void (^) (NSString* __nullable thirdPartyId)) callback;
Copied to your clipboardstatic func getThirdPartyId(_ completion: @escaping (String?, Error?) -> Void)
Copied to your clipboard+ (void) getThirdPartyId: (nonnull void (^) (NSString* _Nullable thirdPartyId, NSError* _Nullable error)) completion;
Copied to your clipboard+ (void) getThirdPartyId: (nonnull void (^) (NSString* __nullable thirdPartyId)) callback;
getTntId
Copied to your clipboardstatic func getTntId(_ completion: @escaping (String?, Error?) -> Void)
Copied to your clipboard+ (void) getTntId: (nonnull void (^) (NSString* _Nullable tntId, NSError* _Nullable error)) completion;
Copied to your clipboard+ (void) getTntId: (nonnull void (^) (NSString* __nullable tntId)) callback;
Copied to your clipboardstatic func getTntId(_ completion: @escaping (String?, Error?) -> Void)
Copied to your clipboard+ (void) getTntId: (nonnull void (^) (NSString* _Nullable tntId, NSError* _Nullable error)) completion;
Copied to your clipboard+ (void) getTntId: (nonnull void (^) (NSString* __nullable tntId)) callback;
prefetchContent
Copied to your clipboardstatic func prefetchContent(_ prefetchArray: [TargetPrefetch], with targetParameters: TargetParameters? = nil, _ completion: ((Error?) -> Void)?)
Copied to your clipboard+ (void) prefetchContent: (NSArray<AEPTargetPrefetchObject*>* _NonNull) prefetchArraywithParameters: (AEPTargetParameters* _Nullable) targetParameterscallback: (nullable void (^) (NSError* _Nullable error)) completion;
Copied to your clipboard+ (void) prefetchContent: (nonnull NSArray<ACPTargetPrefetchObject*>*) prefetchObjectArraywithParameters: (nullable ACPTargetParameters*) parameterscallback: (nullable void (^) (NSError* _Nullable error)) callback;
Copied to your clipboardstatic func prefetchContent(_ prefetchArray: [TargetPrefetch], with targetParameters: TargetParameters? = nil, _ completion: ((Error?) -> Void)?)
Copied to your clipboard+ (void) prefetchContent: (NSArray<AEPTargetPrefetchObject*>* _NonNull) prefetchArraywithParameters: (AEPTargetParameters* _Nullable) targetParameterscallback: (nullable void (^) (NSError* _Nullable error)) completion;
Copied to your clipboard+ (void) prefetchContent: (nonnull NSArray<ACPTargetPrefetchObject*>*) prefetchObjectArraywithParameters: (nullable ACPTargetParameters*) parameterscallback: (nullable void (^) (NSError* _Nullable error)) callback;
registerExtension
Registration occurs by passing Target
to the MobileCore.registerExtensions
API.
Copied to your clipboardMobileCore.registerExtensions([Target.self])
Registration occurs by passing AEPMobileTarget
to the [AEPMobileCore registerExtensions:completion:]
API.
Copied to your clipboard[AEPMobileCore registerExtensions:@[AEPMobileTarget.class] completion:nil];
Copied to your clipboard[ACPTarget registerExtension];
Registration occurs by passing Target
to the MobileCore.registerExtensions
API.
Copied to your clipboardMobileCore.registerExtensions([Target.self])
Registration occurs by passing AEPMobileTarget
to the [AEPMobileCore registerExtensions:completion:]
API.
Copied to your clipboard[AEPMobileCore registerExtensions:@[AEPMobileTarget.class] completion:nil];
Copied to your clipboard[ACPTarget registerExtension];
retrieveLocationContent
Copied to your clipboardstatic func retrieveLocationContent(_ requestArray: [TargetRequest], with targetParameters: TargetParameters? = nil)
Copied to your clipboard(void) retrieveLocationContent: (NSArray<AEPTargetRequestObject*>* _NonNull) requestsArraywithParameters: (AEPTargetParameters* _Nullable) targetParameters;
Copied to your clipboard+ (void) retrieveLocationContent: (nonnull NSArray<ACPTargetRequestObject*>*) requestswithParameters: (nullable ACPTargetParameters*) parameters;
Copied to your clipboardstatic func retrieveLocationContent(_ requestArray: [TargetRequest], with targetParameters: TargetParameters? = nil)
Copied to your clipboard(void) retrieveLocationContent: (NSArray<AEPTargetRequestObject*>* _NonNull) requestsArraywithParameters: (AEPTargetParameters* _Nullable) targetParameters;
Copied to your clipboard+ (void) retrieveLocationContent: (nonnull NSArray<ACPTargetRequestObject*>*) requestswithParameters: (nullable ACPTargetParameters*) parameters;
setPreviewRestartDeepLink
Copied to your clipboardstatic func setPreviewRestartDeepLink(_ deeplink: URL)
Copied to your clipboard+ (void) setPreviewRestartDeeplink: (NSURL* _NonNull) deeplink;
Copied to your clipboard+ (void) setPreviewRestartDeeplink: (nonnull NSURL*) deeplink;
Copied to your clipboardstatic func setPreviewRestartDeepLink(_ deeplink: URL)
Copied to your clipboard+ (void) setPreviewRestartDeeplink: (NSURL* _NonNull) deeplink;
Copied to your clipboard+ (void) setPreviewRestartDeeplink: (nonnull NSURL*) deeplink;
setThirdPartyId
Copied to your clipboardstatic func setThirdPartyId(_ id: String?)
Copied to your clipboard+ (void) setThirdPartyId: (NSString* _Nullable) thirdPartyId;
Copied to your clipboard+ (void) setThirdPartyId: (nullable NSString*) thirdPartyId;
Copied to your clipboardstatic func setThirdPartyId(_ id: String?)
Copied to your clipboard+ (void) setThirdPartyId: (NSString* _Nullable) thirdPartyId;
Copied to your clipboard+ (void) setThirdPartyId: (nullable NSString*) thirdPartyId;