Replace RevenueCatUITestsDev with PaywallScreenshotTests Tuist project#6744
Conversation
Replaces the manually maintained RevenueCatUITestsDev scheme in RevenueCat.xcodeproj with a self-contained Tuist project whose name clearly communicates its purpose: rendering paywall templates and capturing screenshots for visual validation. The new project is gated behind TUIST_INCLUDE_TEST_DEPENDENCIES and references UnitTestsHostApp from RevenueCatTests via a cross-project dependency, keeping it self-contained without duplicating infrastructure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The screenshot job now uses RevenueCat-Tuist.xcworkspace instead of the manually maintained RevenueCat.xcworkspace, so it needs tuist install + generate before running tests. TUIST_INCLUDE_TEST_DEPENDENCIES=true is required to include the PaywallScreenshotTests project. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Now superseded by the PaywallScreenshotTests Tuist project. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
heads up @ajpallares I am exploring removing this once and for all 🤓 |
Tuist validates folder reference paths at generate time. Running tuist generate before the fetch meant paywall-preview-resources didn't exist yet, so it was silently dropped from the bundle and the screenshot tests failed with "Could not locate paywall-preview-resources". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
The screenshot tests only run on iOS simulator and Mac Catalyst — there is no mac-native platform in the Fastfile. Including .mac triggered a native macOS build of UnitTestsHostApp (deployment target 10.15) which fails because @main/Scene require macOS 11.0+. Drop .mac and narrow the deployment target to iOS 15.0 to match what the tests actually need. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without an explicit macOS deployment target, Tuist leaves MACOSX_DEPLOYMENT_TARGET unset and Xcode fills it with the current SDK version (15.5), which is newer than the CI machine (15.3.2). macOS 12.0 is the correct minimum for Mac Catalyst paired with iOS 15.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tuist 4.x rejects multiplatform(macOS:) without .mac in destinations,
and .mac breaks UnitTestsHostApp (macOS 10.15 + @main/Scene = error).
Using .iOS("15.0") alone leaves MACOSX_DEPLOYMENT_TARGET unset, and
Tuist/Xcode fills it with the current SDK version (15.5), which fails
on CI machines running an older macOS. Inject MACOSX_DEPLOYMENT_TARGET
= 12.0 directly as a raw build setting — correct minimum for Catalyst
paired with iOS 15.0, and bypasses Tuist's destination validator.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4244b89. Configure here.
Tuist generates xcodeproj files inside Projects/*/ subdirectories, so bare names like container:RevenueCatTests.xcodeproj cannot be resolved from the workspace root. Using container: (empty) tells Xcode to search the entire workspace for the target by its GUID, which is the pattern used by all other Tuist-aware test plans. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ajpallares
left a comment
There was a problem hiding this comment.
Thank you for doing this! It's amazing to be able to get rid of RevenueCatUITestsDev from the main Xcode workspace, which has been a source of build errors for us... Thanks!
I have some small comments though
…6751) Adds an `include_test_dependencies` boolean parameter (default: false) to the shared `tuist-generate-workspace` command, then uses it in the screenshot job with `query: "PaywallScreenshotTests"` so only that project is generated. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The Paywall-Screenshots.xctestplan references target GUIDs captured from a full workspace generation. Using query: "PaywallScreenshotTests" triggers targeted generation, which produces different GUIDs — xcodebuild builds the scheme successfully but finds no test bundles because the GUID in the test plan no longer matches the generated project. Drop the query so tuist generate runs without a filter (full workspace), matching what passed at pipeline 37463. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Summary
PaywallScreenshotTestsas a dedicated Tuist project to replace the manually maintainedRevenueCatUITestsDevscheme inRevenueCat.xcodeprojRevenueCatUITests)TUIST_INCLUDE_TEST_DEPENDENCIES, consistent with other test projectsUnitTestsHostAppfromRevenueCatTestsvia a cross-project Tuist dependencyPaywall-Screenshots.xctestplanto reference the Tuist-generated project GUIDsrecord_paywall_screenshotsFastlane lane to useRevenueCat-Tuist.xcworkspacetuist install+generate(withTUIST_INCLUDE_TEST_DEPENDENCIES=true) to the CircleCI screenshot jobRevenueCatUITestsDevtarget and scheme fromRevenueCat.xcodeprojTest plan
record-and-push-paywall-template-screenshotsjob passeshttps://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/37463/workflows/f1f447cf-a55c-4aad-a915-377e17e6267a/jobs/558832
paywall-rendering-validationas expectedhttps://github.com/RevenueCat/paywall-rendering-validation/pull/370
🤖 Generated with Claude Code
Note
Medium Risk
Touches CI/Fastlane test execution and Xcode project configuration for screenshot validation; misconfiguration could break screenshot generation or CI jobs, but no production runtime code paths change.
Overview
Moves paywall screenshot rendering/validation off the manually maintained
RevenueCatUITestsDevXcode target and onto a new Tuist project/scheme,PaywallScreenshotTests, with a slimmed set of sources/resources needed for screenshot capture.Updates automation to use the Tuist-generated workspace:
record_paywall_screenshotsnow runsPaywallScreenshotTestsinRevenueCat-Tuist.xcworkspace, thePaywall-Screenshots.xctestplanpoints at the new host app/test target IDs, and CircleCI generates the Tuist workspace with test dependencies enabled for the screenshot job.Cleans up
RevenueCat.xcodeprojby removing theRevenueCatUITestsDevtarget/scheme and related embedded frameworks/resources, and extendstuist-generate-workspaceto optionally include test/dev dependencies via a new parameter.Reviewed by Cursor Bugbot for commit 7ea0b68. Bugbot is set up for automated code reviews on this repo. Configure here.