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.

  • Entitlements attached to this purchaser info

    Declaration

    Objective-C

    @property (nonatomic, readonly) RCEntitlementInfos *_Nonnull entitlements;
  • All subscription product identifiers with expiration dates in the future.

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    @property (readonly, nullable) NSDate *latestExpirationDate;
  • Deprecated

    use nonSubscriptionTransactions

    Returns all product IDs of the non-subscription purchases a user has made.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DEPRECATED_MSG_ATTRIBUTE("use nonSubscriptionTransactions") NSSet<NSString *> *nonConsumablePurchases;
  • Returns all the non-subscription purchases a user has made. The purchases are ordered by purchase date in ascending order.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<RCTransaction *> *_Nonnull nonSubscriptionTransactions;
  • Returns the build number (in iOS) or the marketing version (in macOS) for the version of the application when the user bought the app. This corresponds to the value of CFBundleVersion (in iOS) or CFBundleShortVersionString (in macOS) in the Info.plist file when the purchase was originally made. Use this for grandfathering users when migrating to subscriptions.

    Note

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

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *originalApplicationVersion;
  • Returns the purchase date 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 (nonatomic, readonly, nullable) NSDate *originalPurchaseDate;
  • Returns the fetch date of this Purchaser info.

    Note

    Can be nil if was cached before we added this

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSDate *requestDate;
  • The date this user was first seen in RevenueCat.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDate *_Nonnull firstSeen;
  • The original App User Id recorded for this user.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull originalAppUserId;
  • URL to manage the active subscription of the user. If this user has an active iOS subscription, this will point to the App Store, if the user has an active Play Store subscription it will point there. If there are no active subscriptions it will be null. If there are multiple for different platforms, it will point to the App Store

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSURL *managementURL;
  • Get the expiration date for a given product identifier. You should use Entitlements though!

    Declaration

    Objective-C

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

    Parameters

    productIdentifier

    Product identifier for product

    Return Value

    The expiration date for productIdentifier, nil if product never purchased

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

    Declaration

    Objective-C

    - (nullable NSDate *)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

    - (nullable NSDate *)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 latest purchase or renewal date for a given entitlement identifier.

    Declaration

    Objective-C

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

    Parameters

    entitlementId

    Entitlement identifier for entitlement

    Return Value

    The purchase date for entitlementId, nil if product never purchased