Skip to content

Generate Mac Catalyst screenshots of Paywall components to be sent to EmergeTools #5303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 95 commits into from
Jul 9, 2025

Conversation

clindsay3
Copy link
Collaborator

@clindsay3 clindsay3 commented Jun 18, 2025

Motivation

In order to support Mac Catalyst for Paywall V2, we need to have a mechanism to verify the correctness of all components. This will also provide a quantifiable roadmap towards implementation of support for Mac Catalyst, since we can check off which components are working properly.

Description

  • Adds 4 new build variations to the Fastfile, for the two variants of Catalyst (Optimized for Mac, and Scaled to Match iPad) and two variants of running iOS apps on Mac (Designed for iPhone and Designed for iPad)
  • Adds a "Designed for iPad/iPhone" target to PaywallsTester target.
  • Adds a new preview to TextComponent called "Detected Platform", that displays which variant of iOS/macOS the component is being viewed on. This will help us sanity check that the screenshots being generated on Emerge are being generated on the expected platform.
  • The two Designed for iOS variants have been disabled in this commit, until Emerge finishes adding support for them.
  • Adds a whitelist (including PaywallsTester and RevenueCatUI) to our EmergeTools preview-based screenshot generation. This gets around a bug in EmergeTools where previews internal to the StoreKit framework were being generated. Should be fixed in the next release of EmergeTools (by this PR: Better image path check EmergeTools/SnapshotPreviews#239).

Just testing how Emerge will handle Mac variants.
Copy link

emerge-tools bot commented Jun 18, 2025

📸 Snapshot Test

Base build not found

No build was found for the base commit f3405d8. This is required to generate a snapshot diff for your pull request.

It's possible that you created a branch off the base commit before all of the CI steps have finished processing, e.g. the one that uploads a build to our system. If that's the case, no problem! Just wait and this will eventually resolve.


🛸 Powered by Emerge Tools

clindsay3 and others added 28 commits June 18, 2025 15:06
@joshdholtz joshdholtz force-pushed the mac-paywalls/test-preview branch from f064fbe to 3a3ac5e Compare July 8, 2025 11:43
@joshdholtz
Copy link
Member

@clindsay3 FYI, I just rebased this from main so that the Emerge Snapshot build has latest previous commit to run 💪

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! 🙌

I just rebased from main and pushed so that the Emerge snapshots have the latest to run and pass 😊

Comment on lines +80 to +98
if #available(iOS 14.0, *), isiOSAppOnMac {
switch UIDevice.current.userInterfaceIdiom {
case .phone:
return "iPhone App on Mac"
case .pad:
return "iPad App on Mac"
default:
return "Unexpected iOS App on Mac"
}
} else {
switch UIDevice.current.userInterfaceIdiom {
case .mac:
return "Mac Catalyst Optimized for Mac"
case .pad:
return "Mac Catalyst Scaled to iPad"
default:
return "Unexpected Platform on Mac Catalyst"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a crazy switch but it makes sense 😀

Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I just have some small questions, mostly about the wording of comments for future us 😄
Great job!

clindsay3 and others added 5 commits July 9, 2025 11:35
@clindsay3 clindsay3 enabled auto-merge (squash) July 9, 2025 03:29
@joshdholtz joshdholtz disabled auto-merge July 9, 2025 10:09
@joshdholtz joshdholtz merged commit 973009b into main Jul 9, 2025
10 of 12 checks passed
@joshdholtz joshdholtz deleted the mac-paywalls/test-preview branch July 9, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants