getUserAttributes()
Retrieves the user attributes, set using setUserAttributes.
Deprecated SDK
We strongly recommend migrating to the new Superwall Expo SDK, see our migration guide for details.
Purpose
Retrieves the user attributes that were previously set using setUserAttributes().
Signature
async getUserAttributes(): Promise<UserAttributes>Parameters
This method takes no parameters.
Returns / State
Returns a Promise that resolves with an object representing the user's attributes. The object has string keys and values can be any JSON-encodable value, URLs, or Dates.
Usage
const attributes = await Superwall.shared.getUserAttributes()
console.log("User attributes:", attributes)
// Example output: { name: "John", email: "john@example.com", plan: "premium" }Related
setUserAttributes()- Set user attributesidentify()- Identify a user
How is this guide?
Edit on GitHub