bizz84 / SwiftyStoreKit

Lightweight In App Purchases Swift framework for iOS 8.0+, tvOS 9.0+ and macOS 10.10+ ⛺
MIT License
6.55k stars 794 forks source link

Jailbreak device handle #669

Open tiendaik opened 2 years ago

tiendaik commented 2 years ago

I have read code and search for issue but I can't find any issue related to keyword "jailbreak", so I want to know SwiftyStoreKit has handle this or not? Here is the guide link to get free in app purchase on jailbreak device. Basically the addPayment call is intercepted and the updatedTransaction delegate method is called back immediately with a state of SKPaymentTransactionStatePurchased.

harsh12312 commented 2 years ago

Verify the purchase by sending the receipt to backend, if it validates reward the user.

ShKhan9 commented 2 years ago

Verify the purchase by sending the receipt to backend, if it validates reward the user.

I have one non-consumable in iOS app (premium update) , Do you mean that every time the user opens the app i have to do

    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 paid and iap not hacked ?

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