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?