SKProduct Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/StoreKit.framework |
| Availability | Available in iOS 3.0 and later. |
| Companion guide | |
| Declared in | SKProduct.h |
Overview
SKProduct objects are returned as part of an SKProductsResponse object. Each product object provides information about a product you previously registered in iTunes Connect.
Tasks
Getting Product Attributes
-
localizedDescriptionproperty -
localizedTitleproperty -
priceproperty -
priceLocaleproperty -
productIdentifierproperty
Getting Downloadable Content Information
-
downloadableproperty -
downloadContentLengthsproperty -
downloadContentVersionproperty
Properties
downloadable
A Boolean value that indicates whether the App Store has downloadable content for this product. (read-only)
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 YES if at least one file has been associated with the product.
Availability
- Available in iOS 6.0 and later.
Declared In
SKProduct.hdownloadContentLengths
The lengths of the downloadable files available for this product. (read-only)
Discussion
The array holds NSNumber objects, each of which holds a long long value that is the size of one of the downloadable files (in bytes).
Availability
- Available in iOS 6.0 and later.
Declared In
SKProduct.hdownloadContentVersion
A string that identifies which version of the content is available for download. (read-only)
Discussion
The version string is formatted as a series of integers separated by periods.
Availability
- Available in iOS 6.0 and later.
Declared In
SKProduct.hlocalizedDescription
A description of the product. (read-only)
Discussion
The description is localized based on the currentLocale property.
Availability
- Available in iOS 3.0 and later.
Declared In
SKProduct.hlocalizedTitle
The name of the product. (read-only)
Discussion
The description is localized based on the currentLocale property.
Availability
- Available in iOS 3.0 and later.
Declared In
SKProduct.hprice
The cost of the product in the local currency. (read-only)
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]; |
Availability
- Available in iOS 3.0 and later.
See Also
Declared In
SKProduct.hpriceLocale
The locale used to format the price of the product. (read-only)
Availability
- Available in iOS 3.0 and later.
See Also
Declared In
SKProduct.hproductIdentifier
The string that identifies the product to the Apple App Store. (read-only)
Availability
- Available in iOS 3.0 and later.
Declared In
SKProduct.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)