Skip to content

Latest commit

 

History

History
102 lines (80 loc) · 2.58 KB

acpuserprofile-aepuserprofile.md

File metadata and controls

102 lines (80 loc) · 2.58 KB

Migrating to AEPUserProfile

This document is a reference comparison of ACPUserProfile (2.x) APIs against their equivalent APIs in AEPUserProfile (3.x).

Primary Classes

Type AEP 3.x (Swift) AEP 3.x (Objective-C) ACP 2.x (Objective-C)
Primary Class UserProfile AEPMobileUserProfile ACPUserProfile

UserProfile extension APIs

For more information, please read the Profile API reference.

extensionVersion

{% 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 %}

updateUserAttributes

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static func updateUserAttributes(attributeDict: [String: Any])

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)updateUserAttributesWithAttributeDict:(NSDictionary<NSString *, id> * _Nonnull)attributeDict;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) updateUserAttribute: (nonnull NSString*) attributeName withValue: (nullable NSString*) attributeValue;

{% endtab %} {% endtabs %}

removeUserAttribute

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static void removeUserAttribute(String attributeName)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)removeUserAttributesWithAttributeNames:(NSArray<NSString *> * _Nonnull)attributeNames;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) removeUserAttribute: (nonnull NSString*) key

{% endtab %} {% endtabs %}

getUserAttributes

{% tabs %} {% tab title="AEP 3.x (Swift)" %}

public static void getUserAttributes(List<String> keys, AdobeCallback<Map<String, Object>> callback)

{% endtab %}

{% tab title="AEP 3.x (Objective-C)" %}

+ (void)getUserAttributesWithAttributeNames:(NSArray<NSString *> * _Nonnull)attributeNames completion:(void (^ _Nonnull)(NSDictionary<NSString *, id> * _Nullable, enum AEPError))completion;

{% endtab %}

{% tab title="ACP 2.x (Objective-C)" %}

+ (void) getUserAttributes: (nullable NSArray <NSString*>*) attributNames withCompletionHandler: (nonnull void (^) (NSDictionary* __nullable userAttributes, NSError* _Nullable error)) completionHandler

{% endtab %} {% endtabs %}