This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Represents the data structure expected from the web checkout JSON payload. | |
struct WebCheckoutData: Codable, Equatable { | |
// Properties matching the JSON keys (using camelCase) | |
let presentationId: String? | |
let placementId: String? | |
let abTestId: String? | |
let abTestVariantId: String? | |
let stripePriceId: String | |
let stripeObjectType: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import Purchasely | |
// Only for example purpose | |
@MainActor | |
struct MainView: View { | |
@State private var showingSheet = false | |
@StateObject var viewModel: MainViewModel = MainViewModel() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import Purchasely | |
// ONLY FOR EXAMPLE PURPOSE | |
@MainActor | |
struct MainView: View { | |
@StateObject var viewModel: MainViewModel = MainViewModel() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import Purchasely | |
@MainActor | |
struct MainView: View { | |
@State private var showingSheet = false | |
@StateObject var viewModel: MainViewModel = MainViewModel() | |
var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@available(iOS 13.0, tvOS 13.0, macOS 12.0, watchOS 8.0, *) | |
public struct PLYPresentationView: UIViewControllerRepresentable { | |
public typealias UIViewControllerType = PLYPresentationViewController | |
private let presentationViewController: PLYPresentationViewController! | |
init(presentation: PLYPresentationViewController) { |