Search code examples
iosin-app-purchaseapp-store-connect

iOS IAP Sandbox - is it possible to test on a different bundle ID


This is basically the same as this question: Test iPhone in-app purchases on a different bundle? from 2010 - which never had an accepted answer and for which both unaccepted answers are more conjecture than canonical.

Working on an app using React native and Firebase. We use Crashlytics beta to send out beta test versions, which work via a slightly different bundle ID - eg: com.companyname.appname for the production app and com.companyname.appname.dev for the beta. In xCode this is handled with two different build targets, and these also have different Google Info plists associated with them (in order to use the prod/dev firestore databases).

Now we are working on adding in app purchases, and I hit the problem that in order to properly test them before release, it appears that the bundle ID needs to match perfectly (no wildcards).

I'd prefer not to use the production build for testing because it means pointing the testers to the production database, but it feels like Apple have designed a system that enforces that. It feels like there must be a better way that I am missing. How are others handling IAP testing for iOS apps?


Solution

  • You need to use the same Bundle Identifier for the same App to test IAP.

    1. If your app contains the DEV Mobile Provisioning Profile then it is automatically linked to SandBox Mode. You just need to create Sandbox Testers to https://itunesconnect.apple.com
    2. If you require to test Auto Renew IAP there is also way to do this. Apple provides the Sandbox & Production URLs to communicate for All Previously purchased IAP returned to App. For Auto Renew please check this link.