-
Notifications
You must be signed in to change notification settings - Fork 804
Open
Labels
answeredQuestions which have accepted answers.Questions which have accepted answers.area: receipt-validationvalidating receipts for customer or purchase verificationvalidating receipts for customer or purchase verificationtype: bug
Description
Bug Report
Apple says,
We found that your in-app purchase products exhibited one or more bugs when reviewed on iPad running iOS 11.4.1 on Wi-Fi connected to an IPv6 network.
Specifically, we are still unable to purchase IAP in your app. Error dialog appears.
Expected Results
I didn't expect to have a problem when Apple checked in-app purchases.
Actual Results
A problem happened. Error dialog always appears when apple checks the app. errorAlertDialog()
Additional Context
- Platform: iOS
- Purchase type: non-consumable
- Environment: production
- SwiftyStoreKit Version: 0.13.3
Related Issues
- IPv6 Network Rejection & Network Error #369 IPv6 Network Rejection & Network Error
- IPv6 network issue #81 IPv6 network issue
- Sandbox testing works - sometimes, long delay waiting for switch to sandbox URL #515 Sandbox testing delays in URL loading
Code
let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "2030202")
SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
switch result {
case .success(let receipt):
let productId = "xxxxxxxxxxxxxxx"
let purchaseResult = SwiftyStoreKit.verifyPurchase(
productId: productId,
inReceipt: receipt)
switch purchaseResult {
case .purchased(let receiptItem):
// Success
case .notPurchased:
SwiftyStoreKit.restorePurchases(atomically: true) { results in
if results.restoreFailedPurchases.count > 0 {
self.errorAlertDialog()
} else if results.restoredPurchases.count > 0 {
print("success")
} else {
print("Nothing to Restore")
//purchase
SwiftyStoreKit.purchaseProduct("xxxxxxxxxxxxxxx", quantity: 1, atomically: true) { result in
switch result {
case .success(let purchase):
SwiftyStoreKit.finishTransaction(purchase.transaction)
case .error(let error):
self.errorAlertDialog()
}
}
}
}
}
case .error(let error):
self.errorAlertDialog()
}
}
Metadata
Metadata
Assignees
Labels
answeredQuestions which have accepted answers.Questions which have accepted answers.area: receipt-validationvalidating receipts for customer or purchase verificationvalidating receipts for customer or purchase verificationtype: bug