RCPurchaserInfo

@interface RCPurchaserInfo : NSObject

A container for the most recent purchaser info returned from RCPurchases. These objects are non-mutable and do not update automatically.

  • All active entitlements.

    Declaration

    Objective-C

    @property (readonly, atomic) NSSet<NSString *> *_Nonnull activeEntitlements;

    Swift

    var activeEntitlements: Set<String> { get }
  • All subscription product identifiers with expiration dates in the future.

    Declaration

    Objective-C

    @property (readonly, atomic) NSSet<NSString *> *_Nonnull activeSubscriptions;

    Swift

    var activeSubscriptions: Set<String> { get }
  • All product identifiers purchases by the user regardless of expriration.

    Declaration

    Objective-C

    @property (readonly, atomic)
        NSSet<NSString *> *_Nonnull allPurchasedProductIdentifiers;

    Swift

    var allPurchasedProductIdentifiers: Set<String> { get }
  • Returns the latest expiration date of all products, nil if there are none

    Declaration

    Objective-C

    @property (readonly, atomic) NSDate *_Nullable latestExpirationDate;

    Swift

    var latestExpirationDate: Date? { get }
  • Returns all the non-consumable purchases a user has made.

    Declaration

    Objective-C

    @property (readonly, atomic) NSSet<NSString *> *_Nonnull nonConsumablePurchases;

    Swift

    var nonConsumablePurchases: Set<String> { get }
  • Returns the version number for the version of the application when the user bought the app. Use this for grandfathering users when migrating to subscriptions.

    Note

    This can be nil, see -[RCPurchases refreshOriginalApplicationVersion:]

    Declaration

    Objective-C

    @property (readonly, atomic) NSString *_Nullable originalApplicationVersion;

    Swift

    var originalApplicationVersion: String? { get }
  • Get the expiration date for a given product identifier. You should use Entitlements though!

    Declaration

    Objective-C

    - (NSDate *_Nullable)expirationDateForProductIdentifier:
        (nonnull NSString *)productIdentifier;

    Swift

    func expirationDate(forProductIdentifier productIdentifier: String) -> Date?

    Parameters

    productIdentifier

    Product identifier for product

    Return Value

    The expiration date for productIdentifier, nil if product never purchased

  • Get the purchase date for a given product identifier. You should use Entitlements though!

    Declaration

    Objective-C

    - (NSDate *_Nullable)purchaseDateForProductIdentifier:
        (nonnull NSString *)productIdentifier;

    Swift

    func purchaseDate(forProductIdentifier productIdentifier: String) -> Date?

    Parameters

    productIdentifier

    Product identifier for subscription product

    Return Value

    The purchase date for productIdentifier, nil if product never purchased

  • Get the expiration date for a given entitlement.

    Declaration

    Objective-C

    - (NSDate *_Nullable)expirationDateForEntitlement:
        (nonnull NSString *)entitlementId;

    Swift

    func expirationDate(forEntitlement entitlementId: String) -> Date?

    Parameters

    entitlementId

    The id of the entitlement.

    Return Value

    The expiration date for the passed in entitlement, can be nil

  • Get the purchase date for a given entitlement identifier.

    Declaration

    Objective-C

    - (NSDate *_Nullable)purchaseDateForEntitlement:
        (nonnull NSString *)entitlementId;

    Swift

    func purchaseDate(forEntitlement entitlementId: String) -> Date?

    Parameters

    entitlementId

    Entitlement identifier for entitlement

    Return Value

    The purchase date for entitlementId, nil if product never purchased

  • Returns the fetch date of this Purchaser info.

    Note

    Can be nil if was cached before we added this

    Declaration

    Objective-C

    @property (readonly, atomic) NSDate *_Nullable requestDate;

    Swift

    var requestDate: Date? { get }