Skip to main content
Question

Keep getting iPad paywall on iPhone

  • October 20, 2025
  • 1 reply
  • 16 views

Forum|alt.badge.img

## Summary
On iPhone (portrait), RevenueCat's `PaywallView` renders a wide/tablet layout (right-side truncation, overflow) for our custom paywalls. The same device renders your default template paywall correctly. This points to a sizing/constraints issue in the custom paywall runtime or size-class detection.

## Environment
- RC SDKs:
  - purchases_flutter: 9.8.0 (also reproduced on 8.10.6)
  - purchases_ui_flutter: 9.8.0 (also reproduced on 8.10.6)
 

## Expected vs Actual
- Expected: On iPhone portrait, `PaywallView` should use a compact/phone layout and fully respect the parent’s width; no horizontal overflow.
- Actual: The paywall renders a wide/tablet layout, appears left-aligned, extends past the right edge, truncating headline text and CTA.

## Minimal Repro (no app-specific wrappers)
We clamp the width to a phone-safe max and center it. The behavior persists even with a very small max width and no scroll views around it.

```dart
// Inside a page body
return SafeArea(
  child: LayoutBuilder(
    builder: (context, constraints) {
      final width = constraints.maxWidth.clamp(0.0, 520.0); // tried 500–600
      return Align(
        alignment: Alignment.topCenter,
        child: SizedBox(
          width: width,
          height: constraints.maxHeight,
          child: PaywallView(
            offering: foundOfferingFromPurchasesGetOfferings, // 'passport-main-paywall' or 'account-main-paywall'
            onPurchaseCompleted: (_, __) {},
            onPurchaseCancelled: () {},
            onPurchaseError: (_) {},
            onRestoreCompleted: (_) {},
          ),
        ),
      );
    },
  ),
);
```

## How we fetch the Offering
```dart
final offerings = await Purchases.getOfferings();
final found = offerings.all['passport-main-paywall'];
```

## What we already tried
- Removed any scroll views or extra wrappers that might relax constraints.
- Presented paywall embedded (in-tab) and also modally full-screen (still clamped) — overflow persists.
- Verified default RC template paywall renders correctly on the same device.
- Upgraded to latest 9.x RC SDKs (also reproduced on 8.10.6).
- Portrait vs landscape: issue reproduces in portrait; landscape also exhibits wide layout (as expected), but we care about portrait.

## Screenshots
- iPhone portrait shows truncated headline and CTA, right edge clipped (attach in forum post).

## Questions for the community
1. Has anyone seen `PaywallView` ignore compact width constraints on iPhone for custom paywalls while default templates behave?
2. Is there a known issue where size-class detection falls back to regular/tablet for custom templates embedded via `UiKitView`?
3. Is there a recommended way to force the phone/compact variant for custom paywalls?
4. Any best practices for designing custom paywalls to ensure they respect compact width in embedded contexts?

## Notes
- We only need embedded, in-tab behavior. The layout should honor compact width like the default template.
- Happy to share offering JSON or a screen recording if helpful.

 

This post has been closed for comments

1 reply

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 149 replies
  • October 22, 2025

Hey ​@studio-d-ash,

Thanks for sharing those details! From your screenshot it seems like the whole view is overflowing (apart from the bottom actions of Cancel, Restore and Redeem) - this leads to believe that it could be a constraints issue on the view itself and not the rendering of the tablet layout on an iPhone view.

Would you be able to share this specific Paywall ID and Offering ID so we can investigate further? Feel free to open a support ticket (and reference this thread) if you don’t want to share those details here.

In the meantime, could you try and (maybe duplicate into a new paywall for testing purposes) give fixed sizes to the images and packages, to see if that has an impact?