-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1127 from anyproto/ios-2594-implement-payments-su…
…pport-for-ios IOS-2594 Membership | Use price data from StoreKit and Middelware
- Loading branch information
Showing
18 changed files
with
415 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import UIKit | ||
import AnytypeCore | ||
|
||
|
||
extension String { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...rces/PresentationLayer/Modules/Membership/InitialScreen/Views/MembershipPricingView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import SwiftUI | ||
import Services | ||
|
||
|
||
struct MembershipPricingView: View { | ||
let tier: MembershipTier | ||
|
||
var body: some View { | ||
switch tier.paymentType { | ||
case .email: | ||
AnytypeText(Loc.justEMail, style: .bodySemibold, color: .Text.primary) | ||
case .appStore(let product): | ||
AnytypeText("\(product.anytypeDisplayPrice) ", style: .bodySemibold, color: .Text.primary) + | ||
AnytypeText(product.localizedPeriod ?? "", style: .caption1Regular, color: .Text.primary) | ||
case .external(let info): | ||
AnytypeText("\(info.displayPrice) ", style: .bodySemibold, color: .Text.primary) + | ||
AnytypeText(info.localizedPeriod ?? "", style: .caption1Regular, color: .Text.primary) | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
MembershipPricingView(tier: .mockBuilder) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.