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

PaywallsTester: add a new tab that calls presentPaywallIfNeeded #3259

Merged

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented Sep 28, 2023

Adds a new tab that calls presentPaywallIfNeeded

Screenshot 2023-09-28 at 4 25 28 PM

@aboedo aboedo added the test label Sep 28, 2023
@aboedo aboedo requested a review from a team September 28, 2023 19:25
@aboedo aboedo self-assigned this Sep 28, 2023
@@ -108,7 +115,7 @@ struct AppContentView: View {
if let stream = self.customerInfoStream {
for await info in stream {
self.customerInfo = info
self.showingDefaultPaywall = info.activeSubscriptions.count == 0
self.showingDefaultPaywall = self.showingDefaultPaywall && info.activeSubscriptions.count == 0
Copy link
Member Author

Choose a reason for hiding this comment

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

oops this was a bug in #3256, it would still show the paywall every time 😅

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (a9bf4a0) 85.93% compared to head (f18e551) 85.92%.
Report is 4 commits behind head on main.

❗ Current head f18e551 differs from pull request most recent head 633476b. Consider uploading reports for the commit 633476b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3259      +/-   ##
==========================================
- Coverage   85.93%   85.92%   -0.02%     
==========================================
  Files         233      233              
  Lines       16657    16657              
==========================================
- Hits        14315    14313       -2     
- Misses       2342     2344       +2     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

import SwiftUI

struct UpsellView: View {
var body: some View {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: space per our style guide.

Comment on lines 16 to 17
This is achieved by calling
`.presentPaywallIfNeeded(requiredEntitlementIdentifier: \(Configuration.entitlement))
Copy link
Contributor

Choose a reason for hiding this comment

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

Love it. Small typo:

Suggested change
This is achieved by calling
`.presentPaywallIfNeeded(requiredEntitlementIdentifier: \(Configuration.entitlement))
This is achieved by calling
`.presentPaywallIfNeeded(requiredEntitlementIdentifier: \(Configuration.entitlement))`


struct UpsellView: View {
var body: some View {
VStack {
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't needed right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I planned on adding more things initially, but never got around to it. I can remove this for now

@aboedo aboedo force-pushed the andy/pwl-297-paywallstester-new-tab-for-presentpaywallifneeded branch from f18e551 to 7ebd5fd Compare October 2, 2023 20:43
@aboedo aboedo enabled auto-merge (squash) October 2, 2023 20:44
@aboedo aboedo merged commit e70d188 into main Oct 3, 2023
18 of 19 checks passed
@aboedo aboedo deleted the andy/pwl-297-paywallstester-new-tab-for-presentpaywallifneeded branch October 3, 2023 13:07
tonidero pushed a commit that referenced this pull request Oct 3, 2023
**This is an automatic release.**

### New Features
* Add `Attribution.setOnesignalUserID` (#3268) via Raquel Diez
(@Raquel10-RevenueCat)
* StoreKit In App messages support (#3252) via Toni Rico (@tonidero)
### Other Changes
* Remove ObjC showStoreMessages API (#3269) via Toni Rico (@tonidero)
* PaywallsTester: add a new tab that calls presentPaywallIfNeeded
(#3259) via Andy Boedo (@aboedo)
* `Paywalls`: small PaywallsTester refactor (#3261) via NachoSoto
(@NachoSoto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants