Products
View and configure Your in-app products (consumables, non-consumables, entitlements) in the Onside SDK. Learn how to fetch, localize, and manage product catalogs.
The Fetching Process: An Overview
Step 1: Creating and Starting a Products Request
import UIKit
import OnsideKit
class ProductsViewController: UIViewController {
private var productsRequest: OnsideProductsRequest?
private var availableProducts: [OnsideProduct] = []
func fetchProducts() {
// A set of product SKUs you want to fetch from the Onside backend.
let productSKUs: Set<String> = [
"com.yourapp.premium_feature",
"com.yourapp.subscription.monthly"
]
// 1. Create the request object.
let request = Onside.makeProductsRequest(productIdentifiers: productSKUs)
// 2. Set the delegate to receive callbacks.
request.delegate = self
// 3. Retain the request object to prevent it from being deallocated.
self.productsRequest = request
// 4. Start the network request.
request.start()
}
}Step 2: Handling the Response with OnsideProductsRequestDelegate
⚠️ Handling Regions and Product Availability
Last updated
Was this helpful?