Skip to main content
Question

Is there way to test restoring purchase on a new device, or after app reinstallation on the same device in development build?

  • October 10, 2025
  • 1 reply
  • 21 views

Forum|alt.badge.img

Hello I’m new to RevenueCat, i like all the cool features there but i have a few questions.

I’m testing iOS version recently, I use storekit to simulate purchase, everything works fine, the transaction history does show in the sandbox data in the RevenueCat dashboard. I’m using anonymous app user id.

If I reinstall the app on the same device, a new anonymous user id is generated when the app is launched. A new anonymous will be generated also if I debug it on another device. I know this is reasonable, since there is no authentication flow here. I read the document that, if using anonymous app user id, RevenueCat can analyze the receipt and link the apple user with the  anonymous id, so when the user logins with the same apple account on another device, or if he or she reinstalls the app, the purchase can be restored.

However, I test the “anonymous user id” flow on two different devices, with the same apple account logged in, the purchase record is not retrieved (for example, the “allPurchasedProductIdentifier” returned  from the customer info api is empty).

Here are some questions I’d like to ask:

1. Is this because I’m using storekit, and three is no receipt approved from apple and so the account cannot be mapped?
2. I cannot find the “sandbox account” setting on two of newer iPads (with iPad OS 17), and I can see the app prompted to sign in with sandbox on the iPad running iPad OS 15. But even after signing with sandbox account, the purchase details don’t show the sandbox account identity, just like those purchase history from anonymous user. Is sandbox account usable only when storekit is absent?  And does using sandbox account require the products in App Store Connect to be approved by Apple?

Additional note: It’s in very initial stage, the storekit products haven’t synced with App Store Connect yet. Thank you! 

This post has been closed for comments

1 reply

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • October 14, 2025

Hey ​@Herbert Ho and welcome to RevenueCat!

You’re correct about what you’re seeing. A couple of clarifications and the path to test restores across devices:

Why StoreKit configuration testing doesn’t restore across devices


When you run with a StoreKit Configuration file, purchases and receipts are generated locally and are not tied to a real Apple account. RevenueCat will ingest those transactions (so you’ll see them in the dashboard), but we can’t correlate two different anonymous users on two devices because there’s no underlying store account to match. Cross-device restore only works when the purchase comes from the same Apple account.

Where to find the Sandbox Apple Account setting

  • iPadOS/iOS 17: Settings → App Store → Sandbox Account

  • iOS/iPadOS 18+: Settings → Developer → Sandbox Apple Account
    Note: Apple only shows this after your first sandbox purchase prompt on the device.

How to test cross-device restore correctly

  1. Create your products in App Store Connect (they do not need to be approved to test; “Ready to Submit” or “Approved” is fine for sandbox testing).

  2. Test on physical devices and remove the StoreKit Configuration file from your Xcode scheme so your app talks to the real sandbox APIs.

  3. Sign in with the same Sandbox Apple Account on both devices.

  4. On the second device, have the user tap Restore Purchases (recommended for user-initiated flows) or call syncPurchases() if you need a programmatic reconcile. Both re-activate purchases made with the same store account; restorePurchases may show OS sign-in UI, syncPurchases won’t. More on these here!

If you’re testing with anonymous App User IDs, RevenueCat will handle ownership according to your Restore Behavior. In the default mode, restores from the same Apple account will transfer/merge as appropriate (anonymous IDs can be merged when they come from the same proof of purchase).

 

Why CustomerInfowas empty on device #2


With StoreKit configuration files, device #2 has no real store account or server-verified receipt to restore from, so there’s nothing to fetch until you test against the real sandbox as outlined above. Once you do, a restore on the second device will populate CustomerInfo from the same Apple account.

Things to conside

  • Make sure the product IDs in RevenueCat match App Store Connect exactly.

  • Don’t leave a StoreKit config file attached to the scheme when you intend to hit sandbox.

With the above, you’ll be able to validate the cross-device restore path accurately. If anything still doesn’t line up, just let me know - happy to help!

Best,