[PW-149] Fix PaywallView landscape issue#1631
Merged
facumenzella merged 8 commits intoMar 20, 2026
Merged
Conversation
Adds debug logging to PaywallViewWrapper to help diagnose why PaywallView() shows nothing in landscape mode. Changes: - Initialize PaywallViewWrapper with .zero frame instead of paywallViewController.view.bounds (matches ViewControllerWrapper) - Add debug prints for view hierarchy setup The FlutterSemanticsScrollView warning mentioned in the issue is NOT an exception - it's a standard iOS accessibility log message. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tonidero
reviewed
Feb 16, 2026
tonidero
reviewed
Feb 16, 2026
Member
Author
|
@tonidero just reworked and retested this. Now it works smoothly. Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-27.at.11.21.10.mov |
tonidero
reviewed
Feb 27, 2026
tonidero
left a comment
Contributor
There was a problem hiding this comment.
I think this makes sense, but would love @ajpallares and/or @rickvdl to take a look before approving 🙏
ajpallares
approved these changes
Mar 2, 2026
ajpallares
left a comment
Member
There was a problem hiding this comment.
I think it makes sense! And nice cleanup too! With ViewControllerWrapper we certainly didn't need to have PaywallViewWrapper 👍
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ain" This reverts commit 7ba556d.
7 tasks
facumenzella
pushed a commit
that referenced
this pull request
Mar 23, 2026
**This is an automatic release.** ## RevenueCat SDK ### 🐞 Bugfixes * [PW-148] Add PaywallPresentationConfiguration for per-platform presentation style (#1623) via Facundo Menzella (@facumenzella) ### 📦 Dependency Updates * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.53.0 (#1692) via RevenueCat Git Bot (@RCGitBot) * [Android 9.27.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.27.0) * [iOS 5.66.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.66.0) ## RevenueCatUI SDK ### 🐞 Bugfixes * [PW-149] Fix PaywallView landscape issue (#1631) via Facundo Menzella (@facumenzella) ### 🔄 Other Changes * Bump json from 2.18.1 to 2.19.2 (#1691) via dependabot[bot] (@dependabot[bot]) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Primarily a versioned release bump across metadata/changelogs with no functional code changes beyond updating reported plugin version strings and dependency versions. > > **Overview** > Bumps the Flutter Purchases and Purchases UI plugins to **`9.15.1`** across `pubspec.yaml`, Gradle, CocoaPods specs, and the runtime-reported plugin version constants (Android/iOS/Web). > > Updates release documentation (`CHANGELOG.md`, `CHANGELOG-LATEST.md`, `VERSIONS.md`) to record the included bugfixes and dependency changes, including `purchases-hybrid-common` **`17.53.0`** (Android `9.27.0`, iOS `5.66.0`) and a `json` dependency bump. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 59eaab9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
PaywallViewrendering/hosting behavior in horizontal (landscape) mode on iOS.FlutterSemanticsScrollView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen.is expected iOS accessibility logging and is not the root cause.Changes
PaywallViewWrapperusage withViewControllerWrapper<PaywallViewController>inPurchasesUiPaywallViewViewControllerWrapperto support configurable constraints:PaywallViewnow opts into edge-to-edge constraints (usesSafeAreaLayoutGuide: false) for proper landscape layoutlayoutSubviewsdidMoveToSuperviewdidMoveToWindowWhy
In landscape, safe-area anchoring for embedded
PaywallViewcan create poor horizontal presentation and may miss expected full-container layout. This change makesPaywallViewfill its container while preserving safe-area behavior for other wrappers by default.Test plan
PaywallViewrenders correctly in portrait on iOSPaywallViewrenders correctly in landscape on iOSPaywallViewis visible and verify layout remains correctFlutterSemanticsScrollView ... focusItemsInRectlog may still appear and is non-fatalRelated Issues
presentPaywalllandscape work)Note
Medium Risk
Medium risk because it changes iOS paywall presentation options and the UIKit child-view-controller attachment/constraint logic, which can affect layout and view controller lifecycle across devices/orientations.
Overview
Fixes iOS paywall landscape layout issues by switching
PaywallViewto use the sharedViewControllerWrapperwith edge-to-edge constraints (opting out of safe-area anchoring for this specific embed).Enhances
ViewControllerWrapperwith ausesSafeAreaLayoutGuideoption (defaulting to safe-area) and hardens attachment/cleanup by attempting attachment inlayoutSubviews,didMoveToSuperview, anddidMoveToWindow, plus guaranteed removal inremoveFromSuperview/deinit.Adjusts
presentPaywallto use full-screen presentation on iPhone (leaving iPad behavior unchanged) to avoid side whitespace in landscape.Written by Cursor Bugbot for commit aeeb84c. This will update automatically on new commits. Configure here.