iOS Developer Library

Developer

StoreKit Framework Reference SKReceiptRefreshRequest Class Reference

Options
Deployment Target:

On This Page
Language:

SKReceiptRefreshRequest

Inheritance


Conforms To


Import Statement


Swift

import StoreKit

Objective-C

@import StoreKit;

Availability


Available in iOS 7.0 and later.

The SKReceiptRefreshRequest class allows an app to refresh its receipt. With this API, the app can request a new receipt if the receipt is invalid or missing. In the sandbox environment, you can request a receipt with any combination of properties to test the state transitions related to Volume Purchase Plan receipts.

  • Initialized a receipt refresh request with optional properties.

    Declaration

    Swift

    init!(receiptProperties properties: [NSObject : AnyObject]!)

    Objective-C

    - (instancetype)initWithReceiptProperties:(NSDictionary *)properties

    Parameters

    properties

    In the test enviroment, the properties that the new receipt should have. For keys, see Receipt Properties.

    In the production environment, set this parameter to nil.

    Return Value

    The initialized request.

    Import Statement

    Objective-C

    @import StoreKit;

    Swift

    import StoreKit

    Availability

    Available in iOS 7.0 and later.

  • The properties of the receipt. (read-only)

    Declaration

    Swift

    var receiptProperties: [NSObject : AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly) NSDictionary *receiptProperties

    Discussion

    For keys, see Receipt Properties.

    Import Statement

    Objective-C

    @import StoreKit;

    Swift

    import StoreKit

    Availability

    Available in iOS 7.0 and later.

  • States that a receipt can be in, related to the Volume Purchase Plan.

    Declaration

    Swift

    let SKReceiptPropertyIsExpired: String let SKReceiptPropertyIsRevoked: String let SKReceiptPropertyIsVolumePurchase: String

    Objective-C

    NSString * const SKReceiptPropertyIsExpired NSString * const SKReceiptPropertyIsRevoked NSString * const SKReceiptPropertyIsVolumePurchase

    Constants

    • SKReceiptPropertyIsExpired

      SKReceiptPropertyIsExpired

      A key whose value is an instance of NSNumber interpreted as a Boolean value, indicating whether the receipt is expired.

      Available in iOS 7.0 and later.

    • SKReceiptPropertyIsRevoked

      SKReceiptPropertyIsRevoked

      A key whose value is an instance of NSNumber interpreted as a Boolean value, indicating whether the receipt has been revoked.

      Available in iOS 7.0 and later.

    • SKReceiptPropertyIsVolumePurchase

      SKReceiptPropertyIsVolumePurchase

      A key whose value is an instance of NSNumber interpreted as a Boolean value, indicating whether the receipt is is a Volume Purchase Plan receipt.

      Available in iOS 7.0 and later.