RevenueCat/purchases-ios

RevenueCat not updating to match Apple Sandbox

drekka opened this issue · 3 comments

drekka commented

Describe the bug

I'm not sure if this is a bug or something I'm doing or misunderstanding as this is my first experience with purchasing and RevenueCat.

What I'm trying to test is the situation where a subscription has been cancelled. So I purchased a subscription, then went into the Apple App Store and cleared the test user's purchase history.

But when I ran the app again, the RevenueCat returned active customer info.

So I tried removing the user via the RevenueCat console and ran the app again, but the SDK keeps giving me back an active user's customer info.

So what am I miss-understanding? How can I test a cancelled subscription?

  1. Environment
    1. Platform:
    2. SDK version: 4.25.4
    3. StoreKit version:
      • StoreKit 1
      • StoreKit 2 (enabled with usesStoreKit2IfAvailable(true))
    4. OS version:
    5. Xcode version: 14.3.1
    6. Device and/or simulator:
      • Device
      • Simulator
    7. Environment:
      • Sandbox
      • TestFight
      • Production
    8. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue. Complete logs with Purchases.logLevel = .verbose will help us debug this issue.
Logs here
  1. Steps to reproduce, with a description of expected vs. actual behavior

  2. Create a renewing subscription

  3. Purchase the subscription.

  4. Cancel the subscription and remove it from the user in the App Store.

  5. Start the app

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

Hello @drekka

In order to test a subscription that has been cancelled, you need to follow these steps to cancel the auto-renewal subscription and wait until the next renewal period:

https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox/testing_disabling_auto-renew

When you reset a sandbox user's purchase history in AppStoreConnect, that will not automatically clear the user's transactions history on RevenueCat. To do that you need to remove the user from RC manually as you did.

As for why you see customer info even after deleting the subscriber, do you mean you see the same info as before deleting it? That might be a caching issue, can you try deleting the app completely and reinstalling/logging in?

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.