Skip to main content
Question

RevenueCatUI.presentPaywallIfNeeded after app resume

  • March 7, 2025
  • 1 reply
  • 13 views

Forum|alt.badge.img

Hello,

The question is about Flutter SDK on iOS.

I noticed the following behaviour for RevenueCatUI.presentPaywallIfNeeded and RevenueCatUI.presentPaywall:

- If the app was in the background, and I call “await RevenueCatUI.presentPaywall(...)” right after the app is resumed, the call never returns (awaiting forever).
- Everything works if I add 500-1000 ms delay after the app is resumed.

Could someone explain why is this happening? How can I wait for the SDK to be ready to show the paywall without adding an explicite delay?
I tried:
- await Purchases.getCustomerInfo();
- await Purchases.getProducts();
- await Purchases.getOfferings();

Nothing from this list helps, only the actual delay does.

Thank you.

1 reply

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 240 replies
  • March 11, 2025

Hi ​@yuri-47921c, thanks for sharing this. Can you see if any errors or unusual logs print to the console when this happens? You can enable debug logs by following this guide. After they're enabled you'll see logs like this in the console:

[Purchases] - DEBUG: No cached entitlements, fetching
[Purchases] - DEBUG: GET /v1/subscribers/<APP_USER_ID> 200
[Purchases] - DEBUG: Purchaser info updated, sending to delegate

Please ensure the debug logs include the entire app life-cycle, including the messages printed during initialization of the SDK. The more information you include here, the better we'll be able to help.

For Flutter on iOS, the best way to easily get these logs is to run the app directly from Xcode. Here’s how to do that. Thanks!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings