How to test in-app purchases on a Kotlin Multiplatform Mac app

There are 2 ways of testing an in-app purchase: (1) using a local storekit config and (2) using a sandbox testing account.

Using a local StoreKit config requires an xcode project. Since a Kotlin Multiplatform Mac app doesn't generate one, we cannot use this approach. A KMP Mac app is different from a KMP iOS project which generates an xcode project.

Using a sandbox testing account requires the following 3 things in place:

  1. You must build an .app file and test on it as opposed to a ./gradlew run.
  2. Your in-app product must be in the "ready to review" state. A lot of people including me had an issue getting it to be in the "ready to review" state because:
    1. We didn't know that the screenshot of "Review Information" was required.
    2. We didn't know the screenshot of "Review Information" needed to be 1280x800. This information isn't present anywhere on the App Store Connect and its documentation.
      1. There are some other sizes that work as well. Please see: https://stackoverflow.com/questions/39683170/in-app-purchases-stuck-in-missing-metadata-state
    3. Now we know...
  3. Your Paid App Agreement needs to be in the "Active" state. This means you will need to connect your bank account and provide tax-related information.

With the above 3 in place, you will be able to fetch a in-app product using a sandbox testing account.

Subscribe to tanin

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe