options
An array of subscription options for the subscription store view to merchandise.
Declaration
var options: [SubscriptionStoreControlStyleConfiguration.Option] { get }Discussion
The options property is an array that contains the main content of your subscription store control style, including the auto-renewable subscription products. Use the properties of each options value to declare your control style. Provide a control that enables the customer to subscribe to each option in the array. Call the subscribe() method when the customer activates a control to subscribe.
Display only the subscription options that appear in the options array. Use the allOptions property to access information about all the options, for example, to compute comparisons between subscription options.
To hide and sort subscription options, use the initializer of the SubscriptionStoreView. The options array maintains the sort order, and includes only the options you provide to the subscription store view’s initializer. For example, the following code initializes the subscription store to contain only the subscription options that upgrade the customer’s current subscription:
SubscriptionStoreView(groupID: "SAMPLE", visibleRelationships: .upgrade)If you configure a subscription store view to show the current auto-renewal preference, the options array contains the autoRenewPreference subscription product. There’s no need to specifically display the autoRenewPreference product in that case.
If you declare a subscription store view using SubscriptionOptionSection instances, this property flattens the section structure and ignores any header or footer views.