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:
@@ -74,6 +74,7 @@ struct PaywallView: View {
|
||||
}
|
||||
}
|
||||
.storeButton(.visible, for: .restorePurchases)
|
||||
.storeButton(.visible, for: .redeemCode)
|
||||
.subscriptionStoreControlStyle(.prominentPicker)
|
||||
.subscriptionStoreButtonLabel(.displayName.multiline)
|
||||
.onInAppPurchaseStart { product in
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user