This commit is contained in:
2025-12-16 13:10:50 +08:00
parent 444877fb73
commit fd0ddfd45a
17 changed files with 4751 additions and 3 deletions

View File

@@ -0,0 +1,48 @@
//
// 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
}
}