PurchaseTracker
public protocol PurchaseTrackerImplement this protocol to verify whether a specific purchase has been paid for.
You may implement this against whatever receipt system you use, but typically this is StoreKit.
Flint will call this multiple times for each productID that is required in a PurchaseRequirement,
so implementations only need to respond to single product requests.
- 
                  
                  Call to add an observer for changes to purchases DeclarationSwift func addObserver(_ observer: PurchaseTrackerObserver)
- 
                  
                  Call to remove an observer for changes to purchases DeclarationSwift func removeObserver(_ observer: PurchaseTrackerObserver)
- 
                  
                  Return whether or not the specified product ID has been paid for (and hence features requiring it can be enabled) by the user. Note If the status is not yet known, the implementation can returnnilto indicate this indeterminate status.DeclarationSwift func isPurchased(_ product: NonConsumableProduct) -> Bool?
- 
                  
                  Return whether or not there is an active subscription for this product, whether it is auto-renewing or not. Note If the status is not yet known, the implementation can returnnilto indicate this indeterminate status.DeclarationSwift func isSubscriptionActive(_ product: SubscriptionProduct) -> Bool?
- 
                  
                  Return whether or not past purchases, perhaps consumable credits, mean that this feature is currently enabled. This is your application’s opportunity to implement custom purchase management such as allowing purchase of specific features with a given number of consumable in-app credits, or a custom cross-device purchase syncing mechanism, or grandfathering users in to new features because they bought the app outright in the past.Note If the status is false, the result of prior calls toisPurchasedandisSubscriptionActivewill take precendent if appropriate. If this function returnstrue, the feature will always be enabled if all its other constraints are met.DeclarationSwift func isFeatureEnabledByPastPurchases(_ feature: FeatureDefinition.Type) -> Bool
 View on GitHub
            View on GitHub
           PurchaseTracker Protocol Reference
      PurchaseTracker Protocol Reference