Skip to content

Require the SuperwallKit that keeps paywalls to the game's orientations - #21

Draft
ianrumac wants to merge 1 commit into
mainfrom
ir/affectionate-brown-c72gxu
Draft

ianrumac wants to merge 1 commit into
mainfrom
ir/affectionate-brown-c72gxu

Conversation

@ianrumac

@ianrumac ianrumac commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Why

On iOS, a landscape-only game can be rotated to portrait while a paywall is open, and it stays in portrait after the paywall closes. A customer reported this for a map that's locked to landscape through Screen.autorotateTo*.

SuperwallKit presents the paywall in its own window. That window's root is a plain UIViewController, which allows every orientation, so Unity's orientation settings are never checked. The fix is native: superwall/Superwall-iOS#568 makes the paywall window follow the app's top view controller. For a Unity game, that's Unity's view controller, which reports Screen.autorotateTo*. When the paywall closes, the fix also asks UIKit to check orientations again.

What

  • The generated Podfile now requires SuperwallKit >= 4.19.1, < 5.0. 4.19.1 is the version staged on Superwall-iOS develop, so it's the first release #568 can ship in. No bridge or C# changes are needed.
  • Append builds move an existing Podfile off any requirement this package wrote before (~> 4.0 and >= 4.12.10, < 5.0). Before, only ~> 4.0 was moved. A requirement the developer set by hand is left alone. This logic is now a testable UpdateSuperwallKitRequirement.
  • Old requirements are stored by their version part only, so native-sdk-bump.yml's sed on the pod 'SuperwallKit', '…' line no longer rewrites them too.
  • Changelog entry under 0.4.0, which isn't tagged yet.

Before merging

  • Draft until SuperwallKit 4.19.1 is released with #568 in it. #568 is still open, and its changelog entry sits under 4.18.3, which has already shipped. It needs to move to 4.19.1. If the fix ships in a different version, update the floor here. Merging earlier would make pod install fail.
  • I left ci~/ios-harness/Package.swift at from: "4.12.10". Raising it before the release would break the harness's package resolution, and the harness doesn't test orientation.

Testing

  • Added Tests/Editor/PodfileRequirementTests.cs: both earlier requirements get moved, the current one is unchanged, and a hand-set pin is kept. These are Editor tests, and CI doesn't run Editor tests.
  • Not compiled or run locally: this was a Linux machine without Unity or .NET.
  • Still needs a manual check: in a landscape-locked Unity build on a device, open a paywall, rotate the device, and confirm it stays in landscape and the game is in landscape after the paywall closes.

Generated by Claude Code

SuperwallKit presents a paywall in a window of its own, whose root allowed
every orientation, so Screen.autorotateTo* was never consulted while a
paywall was up. superwall/Superwall-iOS#568 makes that window follow the
app's own view controller. Require 4.19.1, the first release it can ship
in, so games get the fix without pinning it themselves.

Podfiles kept by an Append build are moved off any requirement an earlier
version of this package wrote, not just `~> 4.0`. Those are listed by
their version part only, so native-sdk-bump.yml's rewrite of the current
pod line leaves them alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CR7gAmtFzGVaH1B6Mxxrga
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants