This document is a reference comparison of AEPCampaignClassic (3.x) APIs against their equivalent APIs in ACPCampaignClassic (2.x) for an iOS mobile application implementation.
The AEPCampaignClassic extension is implemented purely in Swift and is compatible with the AEPCore Swift SDK. To ensure a smooth transition from the ACPCampaignClassic 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) | AEP 3.x (Objective-C) | ACP (2.x) |
---|---|---|---|
Primary Class (Module) | CampaignClassic | AEPMobileCampaignClassic | ACPCampaignClassic |
{% tabs %} {% tab title="AEP 3.x (Swift)" %}
static var extensionVersion: String
{% endtab %}
{% tab title="AEP 3.x (Objective-C)" %}
+ (nonnull NSString*) extensionVersion;
{% endtab %}
{% tab title="ACP 2.x (Objective-C)" %}
+ (nonnull NSString*) extensionVersion;
{% endtab %} {% endtabs %}
{% tabs %}
{% tab title="AEP 3.x (Swift)" %}
{% hint style="info" %}
Registration occurs by passing CampaignClassic
to the MobileCore.registerExtensions
API.
{% endhint %}
MobileCore.registerExtensions([CampaignClassic.self])
{% endtab %}
{% tab title="AEP 3.x (Objective-C)" %}
{% hint style="info" %}
Registration occurs by passing AEPMobileCampaignClassic
to the [AEPMobileCore registerExtensions:completion:]
API.
{% endhint %}
[AEPMobileCore registerExtensions:@[AEPMobileCampaignClassic.class] completion:nil];
{% endtab %}
{% tab title="ACP 2.x (Objective-C)" %}
[ACPCampaignClassic registerExtension];
[ACPCore start:^{
}];
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="AEP 3.x (Swift)" %}
static func registerDevice(token: Data, userKey: String?, additionalParameters: [String: Any]?)
{% endtab %}
{% tab title="AEP 3.x (Objective-C)" %}
+ (void) registerDeviceWithToken: (nonnull NSData*) token userKey: (nullable NSString*) userKey additionalParams: (nullable NSDictionary*) additionalParams;
{% endtab %}
{% tab title="ACP 2.x (Objective-C)" %}
+ (void) registerDevice: (nonnull NSData*) token userKey: (nullable NSString*) userKey additionalParams: (nullable NSDictionary*) additionalParams callback: (nullable void (^) (BOOL success)) callback;
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="AEP 3.x (Swift)" %}
static func trackNotificationClick(withUserInfo userInfo: [AnyHashable: Any])
{% endtab %}
{% tab title="AEP 3.x (Objective-C)" %}
+ (void) trackNotificationClickWithUserInfo:(nonnull NSDictionary*) userInfo;
{% endtab %}
{% tab title="ACP 2.x (Objective-C)" %}
+ (void) trackNotificationClick:(nonnull NSDictionary<NSString*, NSString*>*) trackInfo;
{% endtab %} {% endtabs %}
{% tabs %} {% tab title="AEP 3.x (Swift)" %}
static func trackNotificationReceive(withUserInfo userInfo: [AnyHashable: Any])
{% endtab %}
{% tab title="AEP 3.x (Objective-C)" %}
+ (void) trackNotificationReceiveWithUserInfo:(nonnull NSDictionary*) userInfo;
{% endtab %}
{% tab title="ACP 2.x (Objective-C)" %}
+ (void) trackNotificationReceive:(nonnull NSDictionary<NSString*, NSString*>*) trackInfo;
{% endtab %} {% endtabs %}