Skip to content
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

Fix Gradient Preview on iOS 15 #4762

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

fire-at-will
Copy link
Contributor

@fire-at-will fire-at-will commented Feb 5, 2025

Motivation

The spm-revenuecat-ui-ios-15 CI job is currently failing due to compilation issues with the GradientView previews - the preview has more than 10 views inside a container, which SwiftUI doesn't allow:

CI failure

Description

This PR addresses the build issue by abstracting the title and gradient to a private, preview-only LinearGradientPreview view, which halves the number of views in the VStack. This doesn't affect the look of the preview:

Before Change

before

After Change

Screenshot 2025-02-05 at 10 30 38 AM

I'm not yet sure why the existing code worked on newer iOS versions but failed in the iOS 15 job - looking into that now

@fire-at-will fire-at-will changed the title [WIP]: Fix Gradient Preview on iOS 15 Fix Gradient Preview on iOS 15 Feb 5, 2025
@fire-at-will fire-at-will marked this pull request as ready for review February 5, 2025 16:43
@fire-at-will
Copy link
Contributor Author

@RCGitBot please test

@fire-at-will fire-at-will requested review from a team and MarkVillacampa February 5, 2025 16:44
@fire-at-will fire-at-will enabled auto-merge (squash) February 5, 2025 17:29
@fire-at-will fire-at-will merged commit fcd71e1 into main Feb 5, 2025
8 of 10 checks passed
@fire-at-will fire-at-will deleted the fix-gradient-preview-ios15-compilation branch February 5, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants