From 4d0fedf3d2c37e9c4772d9ee1e4913b409276588 Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Tue, 14 Jul 2026 16:22:49 +0000 Subject: [PATCH 1/4] feat(expo): update for 1.2.0 --- content/docs/expo/changelog.mdx | 6 ++++++ content/docs/expo/index.mdx | 2 +- .../expo/sdk-reference/hooks/useSuperwall.mdx | 8 +++++++ content/docs/expo/sdk-reference/index.mdx | 2 +- .../configuring/using-superwalloptions.mdx | 21 +++++++++++++++++-- 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/content/docs/expo/changelog.mdx b/content/docs/expo/changelog.mdx index 968669dc..a8ada994 100644 --- a/content/docs/expo/changelog.mdx +++ b/content/docs/expo/changelog.mdx @@ -5,6 +5,12 @@ description: "Release notes for the Superwall Expo SDK" # Changelog +## 1.2.0 + +### Minor Changes + +- 694c1b1: Update native SDKs (iOS 4.16.1, Android 2.7.20) and add `eventTrackingBehavior` (deprecates `isExternalDataCollectionEnabled`), the `singularDeviceId` integration attribute, a runtime `setEventTrackingBehavior`, and `getStoreFrontCountryCode()`. + ## 1.1.6 ### Patch Changes diff --git a/content/docs/expo/index.mdx b/content/docs/expo/index.mdx index c4b7265b..33ed9008 100644 --- a/content/docs/expo/index.mdx +++ b/content/docs/expo/index.mdx @@ -47,4 +47,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/hooks/useSuperwall.mdx b/content/docs/expo/sdk-reference/hooks/useSuperwall.mdx index 6eed9b57..30cf91de 100644 --- a/content/docs/expo/sdk-reference/hooks/useSuperwall.mdx +++ b/content/docs/expo/sdk-reference/hooks/useSuperwall.mdx @@ -90,6 +90,10 @@ The hook returns an object representing the Superwall store. If a `selector` fun type: "(level: string) => Promise", description: "Sets the SDK log level (debug, info, warn, error, none).", }, + setEventTrackingBehavior: { + type: "(behavior: EventTrackingBehavior) => Promise", + description: "Sets which events Superwall tracks at runtime (\"all\", \"superwallOnly\", or \"none\"), for GDPR/data-collection control.", + }, setIntegrationAttributes: { type: "(attributes: IntegrationAttributes) => Promise", description: "Sets third-party integration identifiers, including `appstackId` for Appstack.", @@ -106,6 +110,10 @@ The hook returns an object representing the Superwall store. If a `selector` fun type: "() => Promise>", description: "Returns device attributes from the native SDK.", }, + getStoreFrontCountryCode: { + type: "() => Promise", + description: "Retrieves the App Store / Play Store storefront country code for the current device.", + }, getEntitlements: { type: "() => Promise", description: "Fetches the user's entitlement snapshot, including active and inactive entitlements, plus all known entitlements when exposed by the native bridge.", diff --git a/content/docs/expo/sdk-reference/index.mdx b/content/docs/expo/sdk-reference/index.mdx index cad91ee6..8af30d8e 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). - + diff --git a/content/shared/configuring/using-superwalloptions.mdx b/content/shared/configuring/using-superwalloptions.mdx index 4ec23c1b..c892cb0f 100644 --- a/content/shared/configuring/using-superwalloptions.mdx +++ b/content/shared/configuring/using-superwalloptions.mdx @@ -411,18 +411,35 @@ Superwall.configure( :::expo -Expo currently uses `isExternalDataCollectionEnabled`. Setting it to `false` suppresses user-initiated tracking, trigger-fire events, and user-attribute updates while keeping internal Superwall event collection enabled. +On Expo SDK `1.2.0` and later, use `eventTrackingBehavior`: + +| Behavior | What Superwall sends | +| --- | --- | +| `EventTrackingBehavior.All` | All SDK event collection is enabled. This is the default. | +| `EventTrackingBehavior.SuperwallOnly` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. | +| `EventTrackingBehavior.None` | No SDK events are sent to Superwall. Paywalls still work because paywall logic runs on device, but dashboard analytics, attribution matching, and audience rules that depend on `acquisition_*` attributes will not receive this event data. | + +Set the initial behavior before calling `configure()`: ```typescript const options = SuperwallOptions() -options.isExternalDataCollectionEnabled = false +options.eventTrackingBehavior = EventTrackingBehavior.None Superwall.configure( "MY_API_KEY", + null, options: options ); ``` +You can also change the behavior at runtime after the SDK is configured. This is useful when a user changes a privacy or consent setting in your app. + +```typescript +await Superwall.shared.setEventTrackingBehavior(EventTrackingBehavior.None) +``` + +`isExternalDataCollectionEnabled` is deprecated on Expo SDK `1.2.0` and later. If older code sets it to `false`, the SDK maps that to `SuperwallOnly`, not `None`. Use `None` when your app needs to stop SDK event collection entirely. + ::: ### Automatically Dismissing the Paywall From 692734728b9a22f515506425013f80543f0c185d Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Tue, 14 Jul 2026 10:08:14 -0700 Subject: [PATCH 2/4] fix(expo): correct configure code sample in event tracking behavior docs Use the Expo v2 object-parameter API (Superwall.configure({ apiKey, options })) and new SuperwallOptions() in the eventTrackingBehavior example. Co-Authored-By: Claude Opus 4.8 (1M context) --- content/shared/configuring/using-superwalloptions.mdx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/content/shared/configuring/using-superwalloptions.mdx b/content/shared/configuring/using-superwalloptions.mdx index c892cb0f..a06dd4b4 100644 --- a/content/shared/configuring/using-superwalloptions.mdx +++ b/content/shared/configuring/using-superwalloptions.mdx @@ -422,14 +422,13 @@ On Expo SDK `1.2.0` and later, use `eventTrackingBehavior`: Set the initial behavior before calling `configure()`: ```typescript -const options = SuperwallOptions() +const options = new SuperwallOptions() options.eventTrackingBehavior = EventTrackingBehavior.None -Superwall.configure( - "MY_API_KEY", - null, - options: options -); +Superwall.configure({ + apiKey: "MY_API_KEY", + options, +}) ``` You can also change the behavior at runtime after the SDK is configured. This is useful when a user changes a privacy or consent setting in your app. From 4e167693edf3c10c458fdddd8def69442436f718 Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Tue, 14 Jul 2026 10:35:36 -0700 Subject: [PATCH 3/4] fix(expo): use string literals for eventTrackingBehavior in docs EventTrackingBehavior is exported only as a type from expo-superwall (and is not re-exported from the compat entry), so the enum member access does not exist at runtime. Use the string-union values ("all"/"superwallOnly"/"none"). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../shared/configuring/using-superwalloptions.mdx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/content/shared/configuring/using-superwalloptions.mdx b/content/shared/configuring/using-superwalloptions.mdx index a06dd4b4..183647ac 100644 --- a/content/shared/configuring/using-superwalloptions.mdx +++ b/content/shared/configuring/using-superwalloptions.mdx @@ -413,17 +413,19 @@ Superwall.configure( On Expo SDK `1.2.0` and later, use `eventTrackingBehavior`: +`eventTrackingBehavior` is a string union — pass one of the following string values: + | Behavior | What Superwall sends | | --- | --- | -| `EventTrackingBehavior.All` | All SDK event collection is enabled. This is the default. | -| `EventTrackingBehavior.SuperwallOnly` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. | -| `EventTrackingBehavior.None` | No SDK events are sent to Superwall. Paywalls still work because paywall logic runs on device, but dashboard analytics, attribution matching, and audience rules that depend on `acquisition_*` attributes will not receive this event data. | +| `"all"` | All SDK event collection is enabled. This is the default. | +| `"superwallOnly"` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. | +| `"none"` | No SDK events are sent to Superwall. Paywalls still work because paywall logic runs on device, but dashboard analytics, attribution matching, and audience rules that depend on `acquisition_*` attributes will not receive this event data. | Set the initial behavior before calling `configure()`: ```typescript const options = new SuperwallOptions() -options.eventTrackingBehavior = EventTrackingBehavior.None +options.eventTrackingBehavior = "none" Superwall.configure({ apiKey: "MY_API_KEY", @@ -434,10 +436,10 @@ Superwall.configure({ You can also change the behavior at runtime after the SDK is configured. This is useful when a user changes a privacy or consent setting in your app. ```typescript -await Superwall.shared.setEventTrackingBehavior(EventTrackingBehavior.None) +await Superwall.shared.setEventTrackingBehavior("none") ``` -`isExternalDataCollectionEnabled` is deprecated on Expo SDK `1.2.0` and later. If older code sets it to `false`, the SDK maps that to `SuperwallOnly`, not `None`. Use `None` when your app needs to stop SDK event collection entirely. +`isExternalDataCollectionEnabled` is deprecated on Expo SDK `1.2.0` and later. If older code sets it to `false`, the SDK maps that to `"superwallOnly"`, not `"none"`. Use `"none"` when your app needs to stop SDK event collection entirely. ::: From b0ad551126f43d63c874e25f24c29c60c09d338e Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Tue, 14 Jul 2026 12:45:51 -0700 Subject: [PATCH 4/4] fix(expo): use hooks/provider API for eventTrackingBehavior and singularDeviceId docs - Rewrite the Expo eventTrackingBehavior examples to the hooks/provider API (SuperwallProvider options + useSuperwall selectors), since the compat EventTrackingBehavior enum is not exported from expo-superwall/compat. - Document the new singularDeviceId integration attribute for Expo using the hooks API, whose IntegrationAttributes type includes the key (the compat union does not). - Note the compat-entry limitation for eventTrackingBehavior. Co-Authored-By: Claude Opus 4.8 (1M context) --- content/docs/integrations/singular.mdx | 19 +++++++++ .../configuring/using-superwalloptions.mdx | 41 +++++++++++++------ 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/content/docs/integrations/singular.mdx b/content/docs/integrations/singular.mdx index 86eab1b2..1589c509 100644 --- a/content/docs/integrations/singular.mdx +++ b/content/docs/integrations/singular.mdx @@ -60,6 +60,25 @@ Superwall.instance.setIntegrationAttributes( ) ``` +### Expo + +On Expo SDK `1.2.0` and later, `singularDeviceId` is available as a typed integration attribute on the hooks API. + +```tsx +import { useSuperwall } from "expo-superwall" + +function SingularAttribution({ sdid }: { sdid: string }) { + const setIntegrationAttributes = useSuperwall((state) => state.setIntegrationAttributes) + + const linkSingular = async () => { + // After Singular returns an SDID + await setIntegrationAttributes({ singularDeviceId: sdid }) + } + + // Call linkSingular() once you have the SDID. +} +``` + ### Other SDKs If your Superwall SDK does not yet expose a typed Singular integration attribute, set `singularDeviceId` as a user attribute instead. diff --git a/content/shared/configuring/using-superwalloptions.mdx b/content/shared/configuring/using-superwalloptions.mdx index 183647ac..9d8738e6 100644 --- a/content/shared/configuring/using-superwalloptions.mdx +++ b/content/shared/configuring/using-superwalloptions.mdx @@ -411,9 +411,7 @@ Superwall.configure( :::expo -On Expo SDK `1.2.0` and later, use `eventTrackingBehavior`: - -`eventTrackingBehavior` is a string union — pass one of the following string values: +On Expo SDK `1.2.0` and later, use the `eventTrackingBehavior` option on the hooks/provider API (`expo-superwall`). It is a string-union field — pass one of the following string values: | Behavior | What Superwall sends | | --- | --- | @@ -421,26 +419,43 @@ On Expo SDK `1.2.0` and later, use `eventTrackingBehavior`: | `"superwallOnly"` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. | | `"none"` | No SDK events are sent to Superwall. Paywalls still work because paywall logic runs on device, but dashboard analytics, attribution matching, and audience rules that depend on `acquisition_*` attributes will not receive this event data. | -Set the initial behavior before calling `configure()`: +Set the initial behavior by passing it in `options` to `SuperwallProvider`: -```typescript -const options = new SuperwallOptions() -options.eventTrackingBehavior = "none" +```tsx +import { SuperwallProvider } from "expo-superwall" -Superwall.configure({ - apiKey: "MY_API_KEY", - options, -}) +export default function App() { + return ( + + + + ) +} ``` You can also change the behavior at runtime after the SDK is configured. This is useful when a user changes a privacy or consent setting in your app. -```typescript -await Superwall.shared.setEventTrackingBehavior("none") +```tsx +import { useSuperwall } from "expo-superwall" + +function PrivacySettings() { + const setEventTrackingBehavior = useSuperwall((state) => state.setEventTrackingBehavior) + + const disableTracking = async () => { + await setEventTrackingBehavior("none") + } + + // Call disableTracking() from your consent UI. +} ``` `isExternalDataCollectionEnabled` is deprecated on Expo SDK `1.2.0` and later. If older code sets it to `false`, the SDK maps that to `"superwallOnly"`, not `"none"`. Use `"none"` when your app needs to stop SDK event collection entirely. +The compat API (`expo-superwall/compat`) also adds `eventTrackingBehavior` in `1.2.0`, but its `EventTrackingBehavior` enum is not yet exported from that entry point. Use the hooks/provider API shown above until a later SDK release exports it. + ::: ### Automatically Dismissing the Paywall