Files
keyboard/keyBoard/Class/Pay/StoreKit2Manager/Models/StoreKitConfig.swift
2025-12-16 13:10:50 +08:00

49 lines
1.4 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// StoreKitConfig.swift
// StoreKit2Manager
//
// Created by xiaopin on 2025/12/6.
//
import Foundation
/// StoreKit
public struct StoreKitConfig {
/// ID
public let productIds: [String]
/// ID
public let lifetimeIds: [String]
///
/// nil
public let nonRenewableExpirationDays: Int?
///
public let autoSortProducts: Bool
///
public let showLog: Bool
///
/// - Parameters:
/// - productIds: ID
/// - lifetimeIds: ID
/// - nonRenewableExpirationDays: 365
/// - autoSortProducts: true
/// - showLog: false
public init(
productIds: [String],
lifetimeIds: [String],
nonRenewableExpirationDays: Int? = 365,
autoSortProducts: Bool = true,
showLog: Bool = false
) {
self.productIds = productIds
self.lifetimeIds = lifetimeIds
self.nonRenewableExpirationDays = nonRenewableExpirationDays
self.autoSortProducts = autoSortProducts
self.showLog = showLog
}
}