-
Notifications
You must be signed in to change notification settings - Fork 338
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
[Paywalls V2] Remove/replace PAYWALL_COMPONENTS
compiler flag and fix OS/platform compile issues
#4727
Conversation
8a06164
to
4fd3cc9
Compare
@RCGitBot please test |
63b7b52
to
82ca8d5
Compare
@RCGitBot please test |
… and tv and things were failing
@RCGitBot please test |
PAYWALL_COMPONENTS
compiler flag and fix OS/platform compile issues
@@ -42,6 +42,7 @@ struct ShadowModifier: ViewModifier { | |||
let shape: (any Shape)? | |||
|
|||
func body(content: Content) -> some View { | |||
#if !os(watchOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executive decision to not support watchOS (right now) in ShadowModifier
because we don't support watchOS in Paywalls V2 yet anyway
public protocol PaywallPartialComponent: PaywallComponentBase {} | ||
|
||
public extension PaywallComponent { | ||
|
||
protocol PartialComponent: PaywallComponentBase {} | ||
typealias ComponentOverrides<T: PaywallPartialComponent> = [ComponentOverride<T>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Older Swift got angry about this being inside of an extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Older Swift:
☁️
✊
Probably a good idea to get more eyes on this |
@@ -14,7 +14,7 @@ | |||
import RevenueCat | |||
import SwiftUI | |||
|
|||
#if PAYWALL_COMPONENTS | |||
#if !os(macOS) && !os(tvOS) // For Paywalls V2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am commenting here because this is where GitHub let's me.
I updated on my other PR line 33 self.fill()
because it wasn't compiling either. MAYBE we can see if it works now without it?
@RCGitBot please test |
@@ -6725,7 +6724,6 @@ | |||
88A543E12C37A4820039C6A5 /* TemplateView+MultiTier.swift in Sources */, | |||
3523048A2D0A0F30003971A4 /* ErrorView.swift in Sources */, | |||
887A60B72C1D037000E1A461 /* WatchTemplateView.swift in Sources */, | |||
4D3BA4CD2D37D15E00668AFC /* PaywallTimelineComponent.swift in Sources */, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checking we want this removed from here, I see in the other change it was duplicated, but I don't see PaywallTimelineComponent
in this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah yeah! It was added to both RevenueCat
and RevenueCatUI
targets which was wrong 😅 So I removed the RevenueCatUI
one since this file is part of the offerings response codable stuff
But thanks for checking 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some references to the flag in the fastfile build_paywalls_tester_for_emerge
and in two ci_pre_xcodebuild.sh
PaywallComponent.MaskShape.self, | ||
from: json.data(using: .utf8)! | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this removal intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah yeah! pill
type is no longer supported and the test were behind compiler flag so it didn't get caught by CI for a while 🫠
@RCGitBot please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -13,10 +13,12 @@ | |||
|
|||
// swiftlint:disable file_length | |||
|
|||
import SwiftUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we need to move this outside the #if
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh yeah, for the applyIf
that are at the bottom of the file 😅 Its not clear and those should probably get moved somewhere else at some point 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a milestone!
withAnimation(.smooth(duration: 0.2)) { | ||
withAnimation(.easeInOut(duration: 0.2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended? (Maybe smooth
is not supported on older versions?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah yeah, intended 😊 Had issues with smooth
on older OS versions so just moved to easeInOut
🤷♂️
public protocol PaywallPartialComponent: PaywallComponentBase {} | ||
|
||
public extension PaywallComponent { | ||
|
||
protocol PartialComponent: PaywallComponentBase {} | ||
typealias ComponentOverrides<T: PaywallPartialComponent> = [ComponentOverride<T>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Older Swift:
☁️
✊
public init( | ||
identifier: String, | ||
serverDescription: String, | ||
metadata: [String: Any] = [:], | ||
paywall: PaywallData? = nil, | ||
availablePackages: [Package] | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checking if this is intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup yup! The part we kept above just added paywallComponents: PaywallComponents? = nil,
as additional parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@RCGitBot please test |
Motivation
Let it be public!
Description
RevenueCat
module#if PAYWALL_COMPONENTS
RevenueCatUI
module#if PAYWALL_COMPONENTS
with#if !os(watchOS) && !os(macOS) // For Paywalls V2