Testing on iOS

Context

Unlike on Android Sandbox, displaying products and purchasing them on iOS Sandbox is less tricky. Meanwhile, the results of such testing are often different from what you should expect to see in production, which does diminish its role.

Such testing is mostly suitable to check the overall functionality of in-apps but doesn’t really help to test complex scenarios.

The first purchase/trial in Sandbox usually works fine and raises no suspicion, but as soon as you try reinstalling the app or testing it “on behalf of a new user”, there will inevitably be unexpected outcomes.

“Empty” profiles

For example, if there is a receipt on the device, Adapty will read it and grant Access Levels to all users with that receipt. Respectively, if the origin user started a free trial, all users with the same access level will receive “introductory_offer_eligibility”: false, as if they were the ones who activated the free trial. Meanwhile, there will be no events for them, since duplicating the events would mess up the analytics.

On Dashboard, such a profile would look like this:

2345

As you can see, they are missing transactions, but do have info about Total Revenue, Access Level, and Product. And here is the original profile with all the transactions:

2019

📘

I've seen something similar on Production 🤔

Similar behavior may occur on Production, which is by design - a person with the same Apple ID will access the app on different devices (e.g. iPhone and iPad), having no trouble accessing the features they paid for. They will have multiple Adapty profiles, sharing one Access Level. Again, there will be no duplicates for events.

How do I test it then?

There are still several steps you can do to run a “from scratch” test:

  1. Delete receipts for the test account in question
  2. Create a new Apple test account: https://help.apple.com/app-store-connect/#/dev8b997bee1
  3. Disable Keychain, as it stores some information, e.g. about Trial Eligibility
  4. Log out of your normal Apple account, so only the Sandbox account would stay active

Is it broken? Will Adapty fix it?

Though we would love to keep sandbox testing simple and insightful, we are sticking with the current logic, as it works best on production. Production performance is the priority of course, and the existing logic not only makes it reliable but also quick, which results in a better user experience and higher conversions.