Class Store
StoreProduct
Type that provides access to all of
StoreKit
‘s product type’s properties.Framework
- Revenue
Cat
Declaration
@objc(RCStoreProduct) final class StoreProduct
Topics
Initializers
Instance Properties
var currencyCode : String?
The ccurrency of the product’s price.
var discounts: [StoreProductDiscount ]
An array of subscription offers available for the auto-renewable subscription.
var introductoryDiscount : StoreProductDiscount ?
The object containing introductory price information for the product. If you’ve set up introductory prices in App Store Connect, the introductory price property will be populated. This property is
nil
if the product has no introductory price.var isFamilyShareable : Bool
A Boolean value that indicates whether the product is available for family sharing in App Store Connect. Check the value of
isFamilyShareable
to learn whether an in-app purchase is sharable with the family group.var localizedDescription : String
A description of the product.
var localizedIntroductoryPriceString : String?
The price of the
introductoryPrice
formatted using priceFormatter
.var localizedPriceString : String
The price of this product using
priceFormatter
.var localizedTitle : String
The name of the product.
var price: Decimal
The decimal representation of the cost of the product, in local currency. For a string representation of the price to display to customers, use
localizedPriceString
.var priceDecimalNumber : NSDecimalNumber
The decimal representation of the cost of the product, in local currency. For a string representation of the price to display to customers, use
localizedPriceString
.var priceFormatter : NumberFormatter ?
Provides a
NumberFormatter
, useful for formatting the price for displaying.var pricePerMonth : NSDecimalNumber ?
Calculates the price of this subscription product per month.
var productCategory : StoreProduct .ProductCategory
The category of this product, whether a subscription or a one-time purchase.
var productIdentifier : String
The string that identifies the product to the Apple App Store.
var productType : StoreProduct .ProductType
The type of product.
var sk1Product: SK1Product?
Returns the
SKProduct
if this StoreProduct
represents a StoreKit.SKProduct
.var sk2Product: SK2Product?
Returns the
Product
if this StoreProduct
represents a StoreKit.Product
.var subscriptionGroupIdentifier : String?
The identifier of the subscription group to which the subscription belongs. All auto-renewable subscriptions must be a part of a group. You create the group identifiers in App Store Connect. This property is
nil
if the product is not an auto-renewable subscription.var subscriptionPeriod : SubscriptionPeriod ?
The period details for products that are subscriptions.
Instance Methods
func getEligiblePromotionalOffers () async -> [PromotionalOffer ]
Finds the subset of
discounts
that’s eligible for the current user.Enumerations
enum ProductCategory
The category of a product, whether a subscription or a one-time purchase.
enum ProductType
The type of product, equivalent to StoreKit’s
Product.ProductType
.Relationships
Inherits From
Conforms To
Objective
C .NSObject Protocol Swift
.CVar Arg Swift
.Custom Debug String Convertible Swift
.Custom String Convertible Swift
.Equatable Swift
.Hashable
See Also
Displaying Products
class Offerings
This class contains all the offerings configured in RevenueCat dashboard. Offerings let you control which products are shown to users without requiring an app update.
class Offering
An offering is a collection of
Package
s, and they let you control which products are shown to users without requiring an app update.class Package
Packages help abstract platform-specific products by grouping equivalent products across iOS, Android, and web. A package is made up of three parts:
identifier
, packageType
, and underlying StoreProduct
.class SubscriptionPeriod
The duration of time between subscription renewals. Use the value and the unit together to determine the subscription period. For example, if the unit is
.month
, and the value is 3
, the subscription period is three months.func offerings() async throws -> Offerings
Fetch the configured
Offerings
for this user.func getOfferings (completion: (Offerings?, Error?) -> Void)
Fetch the configured
Offerings
for this user.func products([String]) async -> [StoreProduct ]
Fetches the
StoreProduct
s for your IAPs for given productIdentifiers
.func getProducts ([String], completion: ([StoreProduct ]) -> Void)
Fetches the
StoreProduct
s for your IAPs for given productIdentifiers
.