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

Paywalls: watchOS support #3291

Merged
merged 16 commits into from
Nov 16, 2023
Merged

Paywalls: watchOS support #3291

merged 16 commits into from
Nov 16, 2023

Conversation

NachoSoto
Copy link
Contributor

simulator_screenshot_38A61F03-8048-40E2-AD3E-384DF4112771
simulator_screenshot_ADD7F6B5-8A39-473B-85E2-5175027F641C

@NachoSoto NachoSoto requested a review from a team October 9, 2023 19:28
@NachoSoto NachoSoto force-pushed the paywalls-watchos-view branch 2 times, most recently from 14407f7 to 17a1f48 Compare October 9, 2023 20:30
@NachoSoto NachoSoto marked this pull request as ready for review October 9, 2023 20:30
@@ -72,7 +72,7 @@ private extension BackendPaywallEventTests {
offeringIdentifier: "offering_1",
paywallRevision: 5,
sessionID: .init(uuidString: "98CC0F1D-7665-4093-9624-1D7308FFF4DB")!,
displayMode: .condensedFooter,
displayMode: .fullScreen,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

.fullScreen is the only available on in watchOS, so I changed this to fix those tests.

@NachoSoto NachoSoto force-pushed the paywalls-watchos-view branch 2 times, most recently from aaa8455 to caa4b31 Compare October 10, 2023 18:39
@NachoSoto NachoSoto changed the title Paywalls: watchOS support [WIP] Paywalls: watchOS support Oct 19, 2023
@NachoSoto NachoSoto marked this pull request as draft October 19, 2023 19:53
@NachoSoto NachoSoto marked this pull request as ready for review November 15, 2023 19:52
@NachoSoto NachoSoto added the feat A new feature label Nov 15, 2023
@NachoSoto NachoSoto changed the title [WIP] Paywalls: watchOS support Paywalls: watchOS support Nov 15, 2023
@NachoSoto NachoSoto force-pushed the paywalls-watchos-view branch 2 times, most recently from 895851d to a3623bc Compare November 15, 2023 20:03
@@ -521,6 +529,14 @@ internal enum TestData {
type: .introductory
)
}

#if os(watchOS)
// `Locale.current` in watchOS produces `en_001` when running tests
Copy link
Contributor Author

@NachoSoto NachoSoto Nov 15, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -15,6 +15,8 @@ import RevenueCat
import SwiftUI

@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
@available(tvOS, unavailable)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to remove the watchOS from the lines above each of these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you don't add it it assumes the requirement matches the deployment target in the target which is 6.2 so it fails to compile.

if #unavailable(watchOS 10.0) {
Color.black
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm, in the else case, I guess this will be nil, so there won't be any background, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct.

NachoSoto added a commit to RevenueCat/revenuecat-docs that referenced this pull request Nov 16, 2023
@@ -24,7 +24,7 @@
"tos_url" : null
},
"localized_strings" : {
"en_001" : {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is broken on watchOS + Xcode 15

@NachoSoto NachoSoto merged commit 6317f09 into main Nov 16, 2023
19 of 20 checks passed
@NachoSoto NachoSoto deleted the paywalls-watchos-view branch November 16, 2023 20:49
tonidero pushed a commit that referenced this pull request Nov 30, 2023
**This is an automatic release.**

### RevenueCatUI
* Paywalls: Fix navigation with close button in UIKit (#3466) via Andy
Boedo (@aboedo)
* `Paywalls`: `watchOS` support (#3291) via NachoSoto (@NachoSoto)
### Dependency Updates
* Bump cocoapods from 1.14.2 to 1.14.3 (#3464) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane from 2.216.0 to 2.217.0 (#3415) via dependabot[bot]
(@dependabot[bot])
* Bump danger from 9.3.2 to 9.4.0 (#3414) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* Some `APITester` fixes (#3444) via NachoSoto (@NachoSoto)
* `HTTPClient`: test all request headers (#3425) via NachoSoto
(@NachoSoto)
* `CircleCI`: fix snapshot generation for iOS 14 (#3431) via NachoSoto
(@NachoSoto)
* Remove `MockStoreMessagesHelper` from SDK (#3417) via NachoSoto
(@NachoSoto)
* Enable explicit_init lint rule and fix issues (#3418) via Mark
Villacampa (@MarkVillacampa)
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.

None yet

2 participants