You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also encountered the same problem, and the product type is: nonConsumable; it can be verified during normal purchase, and every time the purchase is verified through restorePurchases, it will return notPurchased;
The same operation, verify that there is no problem with autoRenewable;
The following code is not a complete code, it is my approximate operation at the time
SwiftyStoreKit.restorePurchases(atomically: true, applicationUsername: "") { results in
let successPurchases = results.restoredPurchases
successPurchases.forEach { purchase in
SwiftyStoreKit.verifyReceipt(using: AppleReceipt, forceRefresh: forceRefresh) { verifyReceiptResult in
switch verifyReceiptResult {
case .success(let receiptInfo):
switch product.type {
case .nonConsumable:
let verifyPurchase = SwiftyStoreKit.verifyPurchase(productId: product.rawValue, inReceipt: receiptInfo)
switch verifyPurchase {
case .purchased(let item):
appendLog("✅","purchased:", product.rawValue)
case .notPurchased:
appendLog("⚠️","notPurchased:", product.rawValue)
}
}
}
}
}
}
To Reproduce
Steps to reproduce the behavior:
Step 1 : Call “restorePurchases()” method
Step 2 : In the callback of restorePurchases(completion: ...) method, -> Call verifyReceipt(using: ...) method, and return case .success( receiptInfo ), -> Call verifyPurchase(productId: ...) method verifying that the purchase
Step 3 : When the product type is nonConsumable, always return "notPurchased"
Additional : In the callback of restorePurchases(completion: ...),print results.restoredPurchases, It is able to see the corresponding commodity purchase record。
Expected behavior
Able to restore purchase successfully,Actually it is a successfully purchased product。
Platform Information
OS: macOS 10.15、macOS11.x,
Purchase Type: non-consumable
Environment: [sandbox, production]
SwiftyStoreKit version: 0.16.3
The text was updated successfully, but these errors were encountered:
Bug Report
I also encountered the same problem, and the product type is:
nonConsumable
; it can be verified during normal purchase, and every time the purchase is verified throughrestorePurchases
, it will returnnotPurchased
;The same operation, verify that there is no problem with
autoRenewable
;The following code is not a complete code, it is my approximate operation at the time
To Reproduce
Steps to reproduce the behavior:
Step 1 : Call “restorePurchases()” method
Step 2 : In the callback of
restorePurchases(completion: ...)
method, -> CallverifyReceipt(using: ...)
method, and returncase .success( receiptInfo )
, -> CallverifyPurchase(productId: ...)
method verifying that the purchaseStep 3 : When the product type is
nonConsumable
, always return "notPurchased"Additional : In the callback of
restorePurchases(completion: ...)
,printresults.restoredPurchases
, It is able to see the corresponding commodity purchase record。Expected behavior
Able to restore purchase successfully,Actually it is a successfully purchased product。
Platform Information
The text was updated successfully, but these errors were encountered: