fix: resolve issue #3 - Iap coupon

Automated fix by Tony CI v3.
Closes #3

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
treyt
2026-02-21 18:03:09 -06:00
parent b062ced000
commit d98acd6a9a
2 changed files with 11 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ struct PaywallView: View {
}
}
.storeButton(.visible, for: .restorePurchases)
.storeButton(.visible, for: .redeemCode)
.subscriptionStoreControlStyle(.prominentPicker)
.subscriptionStoreButtonLabel(.displayName.multiline)
.onInAppPurchaseStart { product in

View File

@@ -3,6 +3,7 @@
// SportsTime
//
import StoreKit
import SwiftUI
struct SettingsView: View {
@@ -11,6 +12,7 @@ struct SettingsView: View {
@State private var viewModel = SettingsViewModel()
@State private var showResetConfirmation = false
@State private var showPaywall = false
@State private var showRedeemCode = false
@State private var showOnboardingPaywall = false
@State private var showSyncLogs = false
@State private var isSyncActionInProgress = false
@@ -79,6 +81,7 @@ struct SettingsView: View {
.sheet(isPresented: $showPaywall) {
PaywallView(source: "settings")
}
.offerCodeRedemption(isPresented: $showRedeemCode)
.sheet(isPresented: $showOnboardingPaywall) {
OnboardingPaywallView(isPresented: $showOnboardingPaywall)
}
@@ -812,6 +815,13 @@ struct SettingsView: View {
Label("Restore Purchases", systemImage: "arrow.clockwise")
}
.accessibilityIdentifier("settings.restorePurchasesButton")
Button {
showRedeemCode = true
} label: {
Label("Redeem Code", systemImage: "giftcard")
}
.accessibilityIdentifier("settings.redeemCodeButton")
}
} header: {
Text("Subscription")