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:
Trey t
2026-01-13 11:41:40 -06:00
parent e4204175ea
commit 22772fa57f
19 changed files with 1293 additions and 34 deletions

View File

@@ -101,7 +101,7 @@ final class TripWizardViewModelTests: XCTestCase {
viewModel.selectedRegions = [.east, .central]
viewModel.hasSetRoutePreference = true
viewModel.hasSetRepeatCities = true
viewModel.mustStopLocations = [LocationInput(name: "Test", coordinates: nil)]
viewModel.mustStopLocations = [LocationInput(name: "Test", coordinate: nil)]
// Change planning mode
viewModel.planningMode = .locations
@@ -176,7 +176,7 @@ final class TripWizardViewModelTests: XCTestCase {
func test_mustStopLocations_canBeAdded() {
let viewModel = TripWizardViewModel()
let location = LocationInput(name: "Chicago, IL", coordinates: nil)
let location = LocationInput(name: "Chicago, IL", coordinate: nil)
viewModel.mustStopLocations.append(location)