Question

Local Storekit testing - Can purchase, but everything else fails

  • 27 September 2023
  • 3 replies
  • 182 views

Badge +3

Hi,

I’ve just added RevenueCat and am trying to do some local testing with storekit. I’ve:

  • Linked all the App secret and server to server notifications
  • Created a storekit file synced with app store connect
  • Added all storekit and other certificates in revenuecat
  • Run the app connected to storekit

When the app runs, I can call getOfferings and getCustomerInfo, and purchase the offering. When I purchase the offering, the transaction shows up in XCode, and my app gets a notification that customerInfo was updated, and I have the active entitlement.

My issue is that I can’t seem to test anything past that. If I refund the purchase in Xcode, or delete the transactions, they are removed from Xcode but getCustomerInfo is never updated. RevenueCat keeps telling me the user is subscribed, even though they are NOT subscribed anymore. In fact, I can call purchase again and purchase the app, even though I was already entitled. There is some issue where RevenueCat does not realize that the subscription was refunded or deleted, so I cannot test any of those flows.

If I wait a bunch of hours, I can see the customer in the revenuecat dashboard, and delete them, and then I can purchase the product again. So it’s weird to me that revenuecat knows about the subscription, but doesn’t realize that it was deleted. Is this expected functionality.

Another very weird thing is that in the RevenueCat app config, it says “no notifications received”. Could this be the problem? Or are server to server notifications not used for local storekit testing? Either way, I set up the notification url in app store connect, but I still don’t see that it received any.


Any help or advice on why I am not seeing the subscriptions get removed from revenue cat when I delete them from xcode using the transaction manager would be much appreciated, it makes it impossible to test since I can’t see if refunds or anything else will work.


3 replies

Userlevel 3
Badge +8

Hi,

Which version of the sdk are you on? It looks like we had a problem that might be relevant that we shipped recently.

Also,

Or are server to server notifications not used for local storekit testing?

Correct, nothing is coming from Apple’s servers if you’re testing on a storekit config file.

Badge +3

I’m on version 6.6.5

 

If you’re testing with a storekit config file, then how are you able to test cancellation or any other events if revenue cat doesn’t get notified when anything is cancelled. It is somehow notified of the purchase happening, but not the other events.

Userlevel 3
Badge +8

Anything you can cancel/change in Xcode can be tested with a Storekit config file, although it’s limited in its functionality: https://www.revenuecat.com/blog/engineering/the-ultimate-guide-to-subscription-testing-on-ios/#h-storekittest

 

There’s a lot more lifecycle testing you can do in the regular sandbox environment (i.e., connecting to Apple’s sandbox servers), including cancellations, etc.

Reply