Skip to content

Instantly share code, notes, and snippets.

@alvaroroyo
Last active September 24, 2019 11:04
Show Gist options
  • Select an option

  • Save alvaroroyo/d08e5337261d2bc9b415f323a7d6174a to your computer and use it in GitHub Desktop.

Select an option

Save alvaroroyo/d08e5337261d2bc9b415f323a7d6174a to your computer and use it in GitHub Desktop.
func fetchProducts() {
let identifiers: Set<String> = ["com.app.premium.monthly","com.app.premium.annual"]
let productsRequest = SKProductsRequest(productIdentifiers: identifiers)
productsRequest.delegate = self
productsRequest.start()
}
//SKProductsRequestDelegate
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
let products: [SKProduct] = response.products
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment