This commit is contained in:
2025-12-16 15:47:12 +08:00
parent c898d16688
commit 30f2e4f24f
5 changed files with 51 additions and 13 deletions

View File

@@ -255,12 +255,17 @@ internal class StoreKitService: ObservableObject {
switch result {
case .success(let verification):
do {
let payload = verification.jwsRepresentation
let transaction = try verifyPurchase(verification)
await printProductDetails(product)
//
await printTransactionDetails(transaction)
await MainActor.run {
self.delegate?.service(self, didCompletePurchaseFor: transaction.productID, payload: payload)
}
//
await transaction.finish()
@@ -561,11 +566,13 @@ internal class StoreKitService: ObservableObject {
//
while !Task.isCancelled {
//
let now = Date()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
formatter.timeZone = TimeZone.current
print("当前订阅检测时间: \(formatter.string(from: now))")
if self.config.showLog {
let now = Date()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
formatter.timeZone = TimeZone.current
print("当前订阅检测时间: \(formatter.string(from: now))")
}
await self.checkSubscriptionStatus()
// 30