Skip to content

Commit

Permalink
Add lifetime product
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Dec 2, 2024
1 parent 819804f commit e11fb20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Library/Sources/CommonIAP/Domain/AppProduct+Features.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extension AppProduct {
.Full.allPlatforms,
.Full.iOS,
.Full.macOS,
.Full.OneTime.lifetime,
.Full.Recurring.monthly,
.Full.Recurring.yearly
]
Expand All @@ -63,6 +64,10 @@ extension AppProduct.Features {
}

extension AppProduct.Full {
public enum OneTime {
public static let lifetime = AppProduct(featureId: "full.lifetime")
}

public enum Recurring {
public static let monthly = AppProduct(featureId: "full.monthly")

Expand Down
5 changes: 5 additions & 0 deletions Library/Sources/UILibrary/Views/Paywall/PaywallView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ private extension PaywallView {
AppFeature.allCases
}

var lifetimeProduct: AppProduct {
.Full.OneTime.lifetime
}

var yearlyProduct: AppProduct {
.Full.Recurring.yearly
}
Expand All @@ -217,6 +221,7 @@ private extension PaywallView {
if let suggestedProduct {
list.append(suggestedProduct)
}
list.append(lifetimeProduct)
list.append(yearlyProduct)
list.append(monthlyProduct)

Expand Down

0 comments on commit e11fb20

Please sign in to comment.