rigdonmr rigdonmr - 1 year ago 87
iOS Question

iOS: How to subscribe a customer to an Automatically Renewable Subscription

What are the most basic steps you need to subscribe to an Automatically Renewable Subscription?

Answer Source

Figured it out. Assuming you know the productID:


import StoreKit

Then in your code

let productID: Set = ["monthly"]
let request = SKProductsRequest(productIdentifiers: productID)
request.delegate = self

and in the SKProductsRequestDelegate:

if response.products.count > 0 {
  let product = response.products[0]
  let payment = SKPayment(product: product)

Your're all welcome

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download