7.0.0 • Published 9 months ago

@adobe/react-native-aepuserprofile v7.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

React Native Adobe Experience Platform User Profile Extension

npm version npm downloads

@adobe/react-native-aepcore is a wrapper around the iOS and Android Adobe Experience Platform User Profile Extension to allow for integration with React Native applications.

Prerequisites

The UserProfile extension has the following peer dependency, which must be installed prior to installing the UserProfile extension:

Installation

See Requirements and Installation instructions on the main page

Install the @adobe/react-native-aepuserprofile package:

NPM:

npm install @adobe/react-native-aepuserprofile

Yarn:

yarn add @adobe/react-native-aepuserprofile

Usage

Initializing with SDK:

To initialize the SDK, use the following methods:

Refer to the root Readme for more information about the SDK setup.

Importing the extension:

In your React Native application, import the UserProfile extension as follows:

import { UserProfile } from "@adobe/react-native-aepuserprofile";

API reference

extensionVersion

Returns the version of the User Profile extension

Syntax

extensionVersion(): Promise<string>

Example

UserProfile.extensionVersion().then((version) =>
  console.log("AdobeExperienceSDK: UserProfile version: " + version)
);

getUserAttributes

Gets the user profile attributes with the given keys.

Syntax

getUserAttributes(attributeNames: Array<string>): Promise<Record<string, any>>

Example

UserProfile.getUserAttributes(["mapKey", "mapKey1"]).then((map) =>
  console.log("AdobeExperienceSDK: UserProfile getUserAttributes: " + map)
);

removeUserAttributes

Removes the user profile attributes for the given keys.

Syntax

removeUserAttributes(attributeNames: Array<string>)

Example

UserProfile.removeUserAttributes(["mapKey1"]);

updateUserAttributes

Sets the user profile attributes key and value. It allows to create/update a batch of user profile attributes.

Syntax

updateUserAttributes(attributeMap: Record<string, any>)

Example

let attrMap = { mapKey: "mapValue", mapKey1: "mapValue1" };
UserProfile.updateUserAttributes(attrMap);
7.0.0

9 months ago

6.0.2

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

5.0.0

2 years ago

2.0.0

3 years ago

1.0.0

4 years ago

1.0.0-beta.2

4 years ago

1.0.0-beta.1

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.2

4 years ago

1.0.0-alpha.1

4 years ago