SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

Receipt verification

Open ShKhan9 opened this issue 2 years ago • 0 comments

I have one non-consumable IAP in iOS app (premium update)

1- Should I call this verify method every time the user opens the app

    let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "xxxxxxxxxxxx")
    SwiftyStoreKit.verifyReceipt(using: appleValidator, forceRefresh: true) { result in
        switch result {
        case .success(let receipt):
            print("success: \(receipt)")
        case .error(let error):
            print("Verify receipt failed: \(error)")
        }
    }

To make sure app is truly paid and IAP not hacked ?

2- Also inside the success block i should open the app premium features , while inside failure i should lock them ?

ShKhan9 avatar Mar 08 '22 12:03 ShKhan9