Subscriptions
Work with auto-renewable subscriptions in OnsideKit: detect them, read the billing period, then purchase, restore, and validate them like any other product.
Detecting a subscription
if let period = product.subscriptionPeriod {
// Subscription — billed once every `period`.
} else {
// One-time product (consumable or non-consumable).
}Subscription properties
Property
Description
The pricing types
struct OnsidePrice {
var value: Double
var currencyCode: String // ISO 4217, e.g. "EUR"
}
enum OnsidePeriod {
case day(UInt)
case week(UInt)
case month(UInt)
case year(UInt)
}Displaying a subscription
Purchasing a subscription
Restoring a subscription
Validating a subscription
Testing subscriptions locally
Last updated
Was this helpful?