Skip to main content
Question

Mock RevenueCat for unit testing in iOS

  • Nov 11, 2023 11:21 PM UTC
  • 1 reply
  • 577 views

Forum|alt.badge.img+3

Is there a simple way to mock RevenueCat to return hardcoded responses for unit testing purposes? One option is to use the StoreKit Testing framework, but then RC still makes an outbound server call for every request which goes deeper than I'd like to for unit testing purposes.

This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • Nov 17, 2023 12:39 AM UTC

Hi, at this time using StoreKit Testing framework would be the only way to do this, but I can pass this along to the team as feedback.