Created
December 9, 2016 15:38
-
-
Save EllinaKuznetcova/bb45bc6de6b97bed5045ab19c15424f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func purchaseProduct(productType: ProductType) { | |
guard let product = self.products.filter({$0.productIdentifier == productType.rawValue}).first else { | |
self.delegate?.inAppLoadingFailed(error: InAppErrors.noProductsAvailable) | |
return | |
} | |
let payment = SKMutablePayment(product: product) | |
SKPaymentQueue.default().add(payment) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment