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

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
AEP 3.x (Swift)
static var extensionVersion: String
AEP 3.x (Objective-C)
+ (nonnull NSString*) extensionVersion;
ACP 2.x (Objective-C)
+ (nonnull NSString*) extensionVersion;

updateUserAttributes

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
AEP 3.x (Swift)
public static func updateUserAttributes(attributeDict: [String: Any])
AEP 3.x (Objective-C)
+ (void)updateUserAttributesWithAttributeDict:(NSDictionary<NSString *, id> * _Nonnull)attributeDict;
ACP 2.x (Objective-C)
+ (void) updateUserAttribute: (nonnull NSString*) attributeName withValue: (nullable NSString*) attributeValue;

removeUserAttribute

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
AEP 3.x (Swift)
public static void removeUserAttribute(String attributeName)
AEP 3.x (Objective-C)
+ (void)removeUserAttributesWithAttributeNames:(NSArray<NSString *> * _Nonnull)attributeNames;
ACP 2.x (Objective-C)
+ (void) removeUserAttribute: (nonnull NSString*) key

getUserAttributes

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
AEP 3.x (Swift)
public static void getUserAttributes(List<String> keys, AdobeCallback<Map<String, Object>> callback)
AEP 3.x (Objective-C)
+ (void)getUserAttributesWithAttributeNames:(NSArray<NSString *> * _Nonnull)attributeNames completion:(void (^ _Nonnull)(NSDictionary<NSString *, id> * _Nullable, enum AEPError))completion;
ACP 2.x (Objective-C)
+ (void) getUserAttributes: (nullable NSArray <NSString*>*) attributNames withCompletionHandler: (nonnull void (^) (NSDictionary* __nullable userAttributes, NSError* _Nullable error)) completionHandler