StoreKitPurchaseTracker

@available(iOS 3, tvOS 9, OSX 10.7, *)
@objc
open class StoreKitPurchaseTracker : NSObject, PurchaseTracker

A basic StoreKit In-App Purchase checker that uses only the payment queue and local storage to cache the list of purchase statuses. It does not validate receipts.

The local storage is unprotected if the user unlocks the device, and as such may be subject to relatively easy editing by the determined cheapskate user to unlock features.

Note

⚠️⚠️⚠️ Do not use this implementation if you insist on cryprographically verifying purchases.

Note

⚠️⚠️⚠️ It is our view that we should rely on the security of Apple’s platform and not be overly concerned with users performing hacks and workarounds. People that go to the effort of jailbreaking, re-signing apps or applying other patching or data editing mechanisms are unlikely to have paid you any money anyway.

If this isn’t good enough for you, you will need to add your own app-specific logic to verify this so there isn’t a single point of verification, and to check receipts. You may not want to use Flint for purchase verification at all if it transpires that the Swift call sites for conditional requests are easily circumvented.

Note

In-App Purchases APIs are not available on watchOS as of watchOS 5. Any Feature that requires a purchase will not be enabled on watchOS.
  • A naïve implementation that assumes all success and restores enable a purchase, and all failures and deferred remove them. This only works for one-time purchases

    Declaration

    Swift

    public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction])