Skip to content

Fix Expo user attribute removal docs#214

Open
dcrawbuck wants to merge 1 commit into
mainfrom
dcrawbuck/fix-expo-nil-docs
Open

Fix Expo user attribute removal docs#214
dcrawbuck wants to merge 1 commit into
mainfrom
dcrawbuck/fix-expo-nil-docs

Conversation

@dcrawbuck

@dcrawbuck dcrawbuck commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Clarifies the shared Setting User Attributes docs so each SDK sees platform-specific callback and attribute removal guidance.
The Expo page now tells users to unset attributes with null, explains that undefined keys are ignored, and notes that nullable attributes require expo-superwall 1.0.5 or later.
The Flutter page no longer shows a non-compiling null removal example because its SDK currently accepts non-null Object values.

Validation

  • bun run build:cf
  • bun test
  • /Users/dcrawbuck/.agents/skills/autoreview/scripts/autoreview --mode local

Note

Low Risk
Documentation-only edits with no runtime, auth, or data-path changes.

Overview
Updates Setting User Attributes so callback notes, intro wording, and attribute removal guidance are split per SDK instead of one shared iOS-style block.

Expo now documents paywall-driven attribute updates via onUserAttributesChange in useSuperwallEvents, removal with null (with undefined keys ignored on the bridge), a update({ profilePic: null }) example, and a 1.0.5+ requirement for nullable attributes.

Flutter explicitly states the SDK only accepts non-null values and does not support deletion via null, removing misleading removal examples.

iOS/Android retain nil / null unset examples under platform tabs; the generic intro now refers to a dictionary or object rather than only [String: Any?].

Reviewed by Cursor Bugbot for commit f74474d. Bugbot is set up for automated code reviews on this repo. Configure here.

@dcrawbuck dcrawbuck marked this pull request as ready for review June 16, 2026 19:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f74474d606

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


:::expo
<Note>
If a paywall uses the **Set user attributes** action, the merged attributes are sent back to your app via the `onUserAttributesChange` callback in `useSuperwallEvents`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document a real Expo attribute-change hook

For Expo users trying to react to a paywall Set user attributes action, this points them to onUserAttributesChange, but the current expo-superwall event surface does not define or dispatch that callback: I checked upstream src/SuperwallEventCallbacks.ts and src/internal/superwallEventBridge.ts, and the callback list/switch only includes the existing paywall, subscription, log, purchase, and custom-callback events. Following this quickstart would therefore compile against a nonexistent callback (or never fire if forced through types); please document the supported Expo path or add the bridge before referencing it here.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant