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;
  • All subscription product identifiers with expiration dates in the future.

    Declaration

    Objective-C

    @property (readonly, atomic) NSSet<NSString *> *_Nonnull activeSubscriptions;
  • All product identifiers purchases by the user regardless of expiration.

    Declaration

    Objective-C

    @property (readonly, atomic)
        NSSet<NSString *> *_Nonnull allPurchasedProductIdentifiers;
  • Returns the latest expiration date of all products, nil if there are none

    Declaration

    Objective-C

    @property (readonly, atomic) NSDate *_Nullable latestExpirationDate;
  • Returns all the non-consumable purchases a user has made.

    Declaration

    Objective-C

    @property (readonly, atomic) NSSet<NSString *> *_Nonnull nonConsumablePurchases;
  • 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 restoreTransactionsForAppStore:]

    Declaration

    Objective-C

    @property (readonly, atomic) NSString *_Nullable originalApplicationVersion;
  • Get the expiration date for a given product identifier. You should use Entitlements though!

    Declaration

    Objective-C

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

    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;

    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;

    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;

    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;