Mac Developer Library

Developer

StoreKit Framework Reference SKProduct Class Reference

Options
Deployment Target:

On This Page
Language:

SKProduct

SKProduct objects are returned as part of an SKProductsResponse object. Each product object provides information about a product you previously registered in iTunes Connect.

Inheritance


Conforms To


Import Statement


import StoreKit @import StoreKit;

Availability


Available in OS X v10.7 and later.
  • A description of the product. (read-only)

    Declaration

    Swift

    var localizedDescription: String! { get }

    Objective-C

    @property(readonly) NSString *localizedDescription

    Discussion

    The description is localized based on the currentLocale property.

    Import Statement

    import StoreKit

    Availability

    Available in OS X v10.7 and later.

  • The name of the product. (read-only)

    Declaration

    Swift

    var localizedTitle: String! { get }

    Objective-C

    @property(readonly) NSString *localizedTitle

    Discussion

    The description is localized based on the currentLocale property.

    Import Statement

    import StoreKit

    Availability

    Available in OS X v10.7 and later.

  • price price Property

    The cost of the product in the local currency. (read-only)

    Declaration

    Swift

    var price: NSDecimalNumber! { get }

    Objective-C

    @property(readonly) NSDecimalNumber *price

    Discussion

    Your application can format the price using a number formatter, as shown in the following sample code:

    • NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
    • [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
    • [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
    • [numberFormatter setLocale:product.priceLocale];
    • NSString *formattedString = [numberFormatter stringFromNumber:product.price];

    Import Statement

    import StoreKit

    Availability

    Available in OS X v10.7 and later.

    See Also

    priceLocale

  • The locale used to format the price of the product. (read-only)

    Declaration

    Swift

    var priceLocale: NSLocale! { get }

    Objective-C

    @property(readonly) NSLocale *priceLocale

    Import Statement

    import StoreKit

    Availability

    Available in OS X v10.7 and later.

    See Also

    price

  • The string that identifies the product to the Apple App Store. (read-only)

    Declaration

    Swift

    var productIdentifier: String! { get }

    Objective-C

    @property(readonly) NSString *productIdentifier

    Import Statement

    import StoreKit

    Availability

    Available in OS X v10.7 and later.

  • A Boolean value that indicates whether the App Store has downloadable content for this product. (read-only)

    Declaration

    Swift

    var downloadable: Bool { get }

    Objective-C

    @property(readonly) BOOL downloadable

    Discussion

    You can associate a set of data files with the iTunes Connect record you created for a product. The value of this property is YEStrue if at least one file has been associated with the product.

    Import Statement

    import StoreKit

    Availability

    Available in OS X v10.8 and later.