RCPurchasesDelegate

@protocol RCPurchasesDelegate <NSObject>

Delegate for RCPurchases responsible for handling updating your app’s state in response to updated purchaser info or promotional product purchases.

Note

Delegate methods can be called at any time after the delegate is set, not just in response to purchaserInfo: calls. Ensure your app is capable of handling these calls at anytime if delegate is set.
  • Called whenever RCPurchases receives updated purchaser info. This may happen periodically throughout the life of the app if new information becomes available (e.g. UIApplicationDidBecomeActive).

    Declaration

    Objective-C

    - (void)purchases:(nonnull RCPurchases *)purchases
        didReceiveUpdatedPurchaserInfo:(nonnull RCPurchaserInfo *)purchaserInfo;

    Parameters

    purchases

    Related RCPurchases object

    purchaserInfo

    Updated RCPurchaserInfo

  • Called when a user initiates a promotional in-app purchase from the App Store. If your app is able to handle a purchase at the current time, run the deferment block in this method. If the app is not in a state to make a purchase: cache the defermentBlock, then call the defermentBlock when the app is ready to make the promotional purchase. If the purchase should never be made, you don’t need to ever call the defermentBlock and RCPurchases will not proceed with promotional purchases.

    Declaration

    Objective-C

    - (void)purchases:(nonnull RCPurchases *)purchases
        shouldPurchasePromoProduct:(nonnull SKProduct *)product
                    defermentBlock:(nonnull RCDeferredPromotionalPurchaseBlock)
                                       makeDeferredPurchase;

    Parameters

    product

    SKProduct the product that was selected from the app store