feat(store): add In-App Purchase system with Pro subscription
Implement freemium model with StoreKit 2: - StoreManager singleton for purchase/restore/entitlements - ProFeature enum defining gated features - PaywallView and OnboardingPaywallView for upsell UI - ProGate view modifier and ProBadge component Feature gating: - Trip saving: 1 free trip, then requires Pro - PDF export: Pro only with badge indicator - Progress tab: Shows ProLockedView for free users - Settings: Subscription management section Also fixes pre-existing test issues with StadiumVisit and ItineraryOption model signature changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
16
SportsTimeTests/Store/StoreErrorTests.swift
Normal file
16
SportsTimeTests/Store/StoreErrorTests.swift
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// StoreErrorTests.swift
|
||||
// SportsTimeTests
|
||||
//
|
||||
|
||||
import Testing
|
||||
import Foundation
|
||||
@testable import SportsTime
|
||||
|
||||
struct StoreErrorTests {
|
||||
@Test func errorDescription_returnsUserFriendlyMessage() {
|
||||
#expect(StoreError.productNotFound.localizedDescription.contains("not found"))
|
||||
#expect(StoreError.purchaseFailed.localizedDescription.contains("failed"))
|
||||
#expect(StoreError.verificationFailed.localizedDescription.contains("verify"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user