-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi, I am trying expo-superwall after previously successfully using @superwall/react-native-superwal@1.4.2. I have everything setup according to the new guide (https://superwall.com/docs/expo/quickstart/present-first-paywall), but am getting the following error when presenting a paywall on iOS Simulator:
ERROR Placement Error: Trying to present paywall without the Superwall config.
Here is my setup:
package.json:
"expo-superwall": "^0.1.3",
"react-native": "0.79.4",
"expo": "53.0.17",
"expo-build-properties": "0.14.8",app.config.js:
plugins: {
[
"expo-build-properties",
{
android: {
minSdkVersion: 26,
},
ios: {
deploymentTarget: "15.1",
},
},
],
}New Architecture is enabled.
app/_layout.tsx (root layout):
const SUPERWALL_IOS_PUBLIC_KEY = process.env.EXPO_PUBLIC_SUPERWALL_IOS_PUBLIC_KEY;
<SuperwallProvider
apiKeys={{
ios: SUPERWALL_IOS_PUBLIC_KEY,
}}
>
<Stack>
<Stack.Screen
name="index"
options={{
headerShown: false,
}}
/>
<Stack.Screen name="+not-found" />
</Stack>
</SuperwallProvider>Usage in index.ts:
export const IndexScreen = () => {
const superwall = useSuperwall();
// register paywall
const { registerPlacement, state: placementState } = usePlacement({
onError: (err) => console.error("Placement Error:", err),
onPresent: (info) => console.log("Paywall Presented:", info),
onDismiss: (info, result) =>
console.log("Paywall Dismissed:", info, "Result:", result),
});
async function onPress () {
await registerPlacement({
placement: "campaign_trigger",
});
console.log("after placement");
},
}I have confirmed I have the default campaign_trigger created:
My API key is provided in my .env and it is being read and configured.
LOG Cleaning up listeners 1
LOG SUPERWALL_IOS_PUBLIC_KEY = pk_***
LOG API KEY LENGTH: 51
The response from useSuperwall() (I've omitted the functions for brevity here):
LOG superwall = {
"isConfigured": true,
"isLoading": false,
"listenersInitialized": true,
"reset": [Function reset],
"subscriptionStatus": {"status": "UNKNOWN"},
"user": {
"aliasId": "$SuperwallAlias:<omitted>",
"applicationInstalledAt": "2025-07-09T05:07:28.439Z",
"seed": 6
}
}
The placementState:
LOG placementState {"error": "Trying to present paywall without the Superwall config.", "status": "error"}
I've rebuilt my app npx expo run:ios and even eas build -e simulator -p ios --local.
Are there any additional debugging instructions I should try? useSuperwall() is returning isConfigured: true, and I can confirm process.env.EXPO_PUBLIC_SUPERWALL_IOS_PUBLIC_KEY is present. The starter campaign_trigger is present, too. But I cannot present any paywalls.