SubscriptionStoreControlStyleConfiguration
The properties of a subscription store control that includes the list of auto-renewable subscriptions to merchandise.
Declaration
struct SubscriptionStoreControlStyleConfigurationOverview
When you define a custom subscription store control style by creating a type that conforms to the SubscriptionStoreControlStyle protocol, you implement the makeBody(configuration:) method. That method takes a SubscriptionStoreControlStyleConfiguration parameter, which has the information necessary to define the behavior and interactions of a subscription store view’s primary controls.
Decide whether your style supports dividing options into sections.
If you support sections, use the sections property to preserve the structure and accessory views you declare using SubscriptionOptionSection instances.
If you don’t support sections, use the options property to have a flattened array of the SubscriptionStoreControlStyleConfiguration.Option values to merchandise.
Provide a control that enables customers to subscribe to each option in either the options or sections properties.
To hide and sort the subscription options that your view displays, use the initializer of the SubscriptionStoreView. For example, you can initialize the subscription store to contain only the subscription options that upgrade the customer’s current subscription.
Display only the subscription options that appear in either the options or sections properties. For example, declaring SubscriptionOptionGroup instances can hide certain subscription options from a control. To access information about other subscription options, use the allOptions property.
In cases where a customer is actively subscribed, use autoRenewPreference to get the Product value of the subscription product that renews at the next billing.
Topics
Getting subscription options to merchandise
optionssectionsSubscriptionStoreControlStyleConfiguration.OptionSubscriptionStoreControlStyleConfiguration.PickerOptionSubscriptionStoreControlStyleConfiguration.SectionSubscriptionStoreControlStyleConfiguration.Icon