You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!
Environment
Output of flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.0, on macOS 15.1.1 24B91 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.95.0)
[✓] Connected device (7 available)
[✓] Network resources
• No issues found!
Version of purchases-flutter: 8.3.1
Testing device version e.g.: iOS 18.1, Android API 35
Steps to reproduce, with a description of expected vs. actual behavior:
Define a button that triggers final offering = await Purchases.getCurrentOfferingForPlacement()
Remove all targetings from the RevenueCat Dashboard
The offering variable will be your current offering for iOS, but null for Android.
Describe the bug
I show the paywalls in my app with this code:
final offering = await Purchases.getCurrentOfferingForPlacement(placement);
if (offering == null) return PaywallResult.cancelled;
return await RevenueCatUI.presentPaywallIfNeeded(
entitlement,
offering: offering,
displayCloseButton: true,
);
It works perfectly for both iOS and Android if I specify targeting that lists all the placements:
However, if I remove the targeting or remove placement definitions in the existing targeting, I would expect the SDK to fallback to the default offering. And it actually does for iOS. On Android though, the offering is null.
Additional context
I would consider the issue to be a bit "dangerous" as you can easily overlook it and end up with no paywall at all in production (which was actually the case for me).
The text was updated successfully, but these errors were encountered:
Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!
Environment
flutter doctor
:purchases-flutter
: 8.3.1final offering = await Purchases.getCurrentOfferingForPlacement()
The offering variable will be your current offering for iOS, but
null
for Android.Describe the bug
I show the paywalls in my app with this code:
It works perfectly for both iOS and Android if I specify targeting that lists all the placements:
However, if I remove the targeting or remove placement definitions in the existing targeting, I would expect the SDK to fallback to the default offering. And it actually does for iOS. On Android though, the offering is null.
Additional context
I would consider the issue to be a bit "dangerous" as you can easily overlook it and end up with no paywall at all in production (which was actually the case for me).
The text was updated successfully, but these errors were encountered: