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
Call Restore Purchase on macOS 11.2, return "Nothing to Restore", and then receive a callback to restore purchase in the completion function. Actually, you have already purchased. The sample code and terminal print information are as follows:
func applicationDidFinishLaunching(_ aNotification: Notification) {
SwiftyStoreKit.completeTransactions(atomically: true) { purchases in
print("completeTransactions:", purchases)
for purchase in purchases {
switch purchase.transaction.transactionState {
case .purchased, .restored:
if purchase.needsFinishTransaction {
// Deliver content from server, then:
SwiftyStoreKit.finishTransaction(purchase.transaction)
}
case .failed, .purchasing, .deferred:
break // do nothing
}
}
}
SwiftyStoreKit.restorePurchases(atomically: true) { results in
if results.restoreFailedPurchases.count > 0 {
print("Restore Failed: \(results.restoreFailedPurchases)")
}
else if results.restoredPurchases.count > 0 {
print("Restore Success: \(results.restoredPurchases)")
}
else {
print("Nothing to Restore")
}
}
}
Bug Report
Call Restore Purchase on macOS 11.2, return "Nothing to Restore", and then receive a callback to restore purchase in the completion function. Actually, you have already purchased. The sample code and terminal print information are as follows:
Terminal Response:
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Platform Information
Potentially Related Issues
The text was updated successfully, but these errors were encountered: