Skip to main content
Question

Expo managed app: Testing IAP in iOS simulator


Forum|alt.badge.img+1
  • Active Member
  • 10 replies

How can I test IAPs in my Expo managed app in the iOS Simulator?

 

I’m getting PURCHASE_CANCELED when I try to purchase a subscription in my app using an Apple Sandbox account. The app is running on the Apple Simulator with iOS 16.4 installed.

 

Looking through the messages in Console.app I see this:

 Purchase did not return a transaction: Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={client-environment-type=Sandbox, storefront-country-code=USA, NSUnderlyingError=0x60000212cae0 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSMultipleUnderlyingErrorsKey=(
    "Error Domain=AMSErrorDomain Code=2 \"An unknown error occurred. Please try again.\" UserInfo={NSLocalizedDescription=An unknown error occurred. Please try again.}",
    "Error Domain=com.apple.accounts Code=4 \"No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox\" UserInfo={NSLocalizedDescription=No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox}"
), NSLocalizedDescription=Authentication Failed, NSLocalizedFailureReason=The authentication failed.}}}
ERROR: 🍎‼️ Purchase was cancelled.

 

I’m guessing this is somehow related to StoreKit setup, but I’m not sure what I need to do to fix this. All the guides I find tell me to run my app from xcode, but since this is a managed Expo app I’m unsure if that’s still what I need to do. Or even if it’s something I can do.

 

I’ve been following this guide https://www.revenuecat.com/blog/engineering/expo-in-app-purchase-tutorial/ so I’m running a proper dev build, *not* Expo Go.

The guide says

Usually, at this point, we’d recommend running a development build from the IDE (Xcode or Android Studio) on your machine and testing in-app purchases on a simulator or emulator. This is not the case with Expo.

But since all guides related to testing IAPs in the Simulator seems to tell me I have to run the dev build from Xcode I don’t know what to do.

 

Is it possible to test RevenueCat in the Apple Simulator using a managed Expo React Native project? If it is, how do I do it?

6 replies

Forum|alt.badge.img+1
  • Author
  • Active Member
  • 10 replies
  • April 1, 2025

Bumping this

 

Is it currently possible to test purchases on an iOS simulator?


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 547 replies
  • April 7, 2025

Hi ​@tobbe, from the debug logs you sent one part of the error you are getting is Error Domain=com.apple.accounts Code=4 \"No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox. Can you make sure you are logged in with a valid Apple sandbox tester account? If you are and still get that error, then this is most likely an error with running the simulator without XCode so I recommend testing on a physical device instead.


Forum|alt.badge.img+1
  • Author
  • Active Member
  • 10 replies
  • April 7, 2025

@Haley Pace Yes, I am logged in. Does that mean RevenueCat currently does not support testing IAPs on the simulator for React Native?


I am hitting the same issue. Any guidance would be much appreciated.


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 547 replies
  • April 17, 2025

Hi ​@tobbe ​@og-tech-caddie , you should be able to test IAPs on a simulator for React Native via a manual XCode build and not through xcodebuild or eas/expo as not doing so can be causing the Error Domain=com.apple.accounts Code=4 \"No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox error. Can you let me know if doing so works for you?


Forum|alt.badge.img+1
  • Author
  • Active Member
  • 10 replies
  • April 17, 2025

@Haley Pace Can you please guide me though using XCode? Remember that I’m using the Expo Managed workflow, as recommended in your guide here https://www.revenuecat.com/blog/engineering/expo-in-app-purchase-tutorial/

This is the relevant part from that blog post
 

Step 4: Native app building

This step differs from most other SDK configurations. Usually, at this point, we’d recommend running a development build from the IDE (Xcode or Android Studio) on your machine and testing in-app purchases on a simulator or emulator. This is not the case with Expo. The benefit of Expo’s managed workflow is that we don’t need to worry about the native parts! Instead, we’ll use the command line to start Android and iOS development builds on Expo’s server, wait for them to complete, and then install those apps on our test devices.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings