From 838f28a7730b3c6ac95118669c1daed0c3509166 Mon Sep 17 00:00:00 2001 From: Lever Date: Tue, 24 Feb 2026 22:10:04 +0000 Subject: [PATCH 1/2] feat(expo): update for 1.0.3 --- content/docs/expo/changelog.mdx | 7 +++++++ content/docs/expo/index.mdx | 2 +- content/docs/expo/sdk-reference/index.mdx | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/content/docs/expo/changelog.mdx b/content/docs/expo/changelog.mdx index b23b01e0..a2183450 100644 --- a/content/docs/expo/changelog.mdx +++ b/content/docs/expo/changelog.mdx @@ -5,6 +5,13 @@ description: "Release notes for the Superwall Expo SDK" # Changelog +## 1.0.3 + +### Patch Changes + +- Update Android & iOS SDKs, add Custom callbacks +- Update Android to 2.7.2, fixing experimental properties option + ## 1.0.2 ### Patch Changes diff --git a/content/docs/expo/index.mdx b/content/docs/expo/index.mdx index 4ad70b61..453727ed 100644 --- a/content/docs/expo/index.mdx +++ b/content/docs/expo/index.mdx @@ -39,4 +39,4 @@ If you have feedback on any of our docs, please leave a rating and message at th If you have any issues please [open an issue on GitHub](https://github.com/superwall/expo-superwall/issues). - + diff --git a/content/docs/expo/sdk-reference/index.mdx b/content/docs/expo/sdk-reference/index.mdx index 21c55bdc..6f28d3d5 100644 --- a/content/docs/expo/sdk-reference/index.mdx +++ b/content/docs/expo/sdk-reference/index.mdx @@ -15,4 +15,4 @@ If you have feedback on any of our docs, please leave a rating and message at th If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/expo-superwall/issues). - + From 8e3d2c6a88e70b01d94b4d8d1562c6dc572a6c5e Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Wed, 25 Feb 2026 13:22:15 -0800 Subject: [PATCH 2/2] docs(expo): add Custom Callbacks SDK reference for 1.0.3 Document onCustomCallback in usePlacement and useSuperwallEvents hooks, including CustomCallback and CustomCallbackResult type tables. --- .../expo/sdk-reference/hooks/usePlacement.mdx | 39 +++++++++++++++++++ .../hooks/useSuperwallEvents.mdx | 4 ++ 2 files changed, 43 insertions(+) diff --git a/content/docs/expo/sdk-reference/hooks/usePlacement.mdx b/content/docs/expo/sdk-reference/hooks/usePlacement.mdx index 7607bd5b..9cfc4d0e 100644 --- a/content/docs/expo/sdk-reference/hooks/usePlacement.mdx +++ b/content/docs/expo/sdk-reference/hooks/usePlacement.mdx @@ -48,6 +48,10 @@ function usePlacement( type: "(error: string) => void", description: "Called when the paywall fails to present or another SDK error occurs.", }, + onCustomCallback: { + type: "(callback: CustomCallback) => Promise | CustomCallbackResult", + description: "Called when a custom callback is invoked from a paywall. Return a result to send back to the paywall.", + }, }} /> @@ -112,6 +116,36 @@ function usePlacement( }} /> +### CustomCallback +?", + description: "Optional variables passed from the paywall.", + }, + }} +/> + +### CustomCallbackResult +?", + description: "Optional key-value pairs to return to the paywall.", + }, + }} +/> + ## Usage ```tsx import { Button, Text } from "react-native" @@ -125,6 +159,11 @@ export default function PremiumButton() { onSkip: (reason) => console.log("Paywall skipped:", reason.type), onError: (error) => console.error("Paywall error:", error), + onCustomCallback: async (callback) => { + // Handle custom callbacks from the paywall + console.log("Custom callback:", callback.name, callback.variables) + return { status: "success", data: { validated: true } } + }, }) const unlockFeature = async () => { diff --git a/content/docs/expo/sdk-reference/hooks/useSuperwallEvents.mdx b/content/docs/expo/sdk-reference/hooks/useSuperwallEvents.mdx index b91ecaf6..c261e7e5 100644 --- a/content/docs/expo/sdk-reference/hooks/useSuperwallEvents.mdx +++ b/content/docs/expo/sdk-reference/hooks/useSuperwallEvents.mdx @@ -99,6 +99,10 @@ The `useSuperwallEvents` hook provides a low-level way to subscribe to *any* nat type: "(paywallInfo: PaywallInfo) => boolean", description: "Android only. Triggered when a rerouted paywall back button is pressed. Return true to consume the event.", }, + onCustomCallback: { + type: "(callback: CustomCallback) => Promise | CustomCallbackResult", + description: "Called when a custom callback is invoked from a paywall. Custom callbacks allow paywalls to communicate with the app to perform operations like validation or data fetching. Return a result to send back to the paywall.", + }, handlerId: { type: "string?", description: "Optional scope for paywall events from a specific registerPlacement handler.",