One Logo Pool Ball
StoreKit · IOS API REFERENCE

Product.SubscriptionPeriod.Unit.FormatStyle

struct · iOS 16.0+ · SDK 27.1

struct FormatStyle

A format style used for localizing subscription period units. Get the format style for a subscription via the `subscriptionPeriodUnitFormatStyle` property of `Product`.

Members (2)

method · iOS 16.0+

format

TypeScript
format(value: Product_SubscriptionPeriod_Unit): string
Swift declaration
func format(_ value: Product.SubscriptionPeriod.Unit) -> String

Get a human readable representation of the unit, localized for the subscription the format style is from.

method · iOS 16.0+

locale

TypeScript
locale(locale: _Foundation_Locale): Product_SubscriptionPeriod_Unit_FormatStyle
Swift declaration
func locale(_ locale: Locale) -> Product.SubscriptionPeriod.Unit.FormatStyle

Modifies the format style to use the specified locale. Use this format style to change the locale used by an existing format style. - Parameter locale: The locale to apply to the format style. - Returns: A format style modified to use the provided locale.

Skipped declarations

No declarations were skipped in this snapshot.

All StoreKit types →