mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
* Introduce PurchaseParams to allow passing extra configuration info when making a purchase * simplify naming * fallback to old method when flag is not enabled * Add $(inherited) to the test targets so they pick up compiler flags from Local.xcconfig * Include product/package inside PurchaseParams * fix tests * add compiler flag check * update purchase tester * fix docs * add tests * Update Sources/Networking/Operations/PostReceiptDataOperation.swift Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com> --------- Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
41 lines
844 B
Swift
41 lines
844 B
Swift
//
|
|
// ContentView.swift
|
|
// Shared
|
|
//
|
|
// Created by Josh Holtz on 1/10/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
import Core
|
|
import RevenueCat
|
|
|
|
struct ContentView: View {
|
|
|
|
let configuration: ConfiguredPurchases
|
|
|
|
@StateObject
|
|
private var observerModeManager: ObserverModeManager
|
|
|
|
init(configuration: ConfiguredPurchases) {
|
|
self.configuration = configuration
|
|
self._observerModeManager = .init(
|
|
wrappedValue: .init(observerModeEnabled: !configuration.purchases.finishTransactions)
|
|
)
|
|
}
|
|
|
|
var body: some View {
|
|
HomeView()
|
|
.environmentObject(self.observerModeManager)
|
|
}
|
|
|
|
}
|
|
|
|
final class RevenueCatCustomerData: ObservableObject {
|
|
|
|
@Published var appUserID: String? = nil
|
|
@Published var customerInfo: CustomerInfo? = nil
|
|
@Published var metadata: [String: String]? = nil
|
|
|
|
}
|