However, I don’t suggest you do this because even after this setup or enabling simulatesAskToBuyInSandbox property, I could not get a notification for the parent account to approve the purchase means I couldn’t test the whole flow. You have to add this child account to the family sharing of the other account and enable Ask to Buy for the child account. Then, you should create a new account that will be a child account, but you have to set its birth year later on since Apple does not ask for a birth year during tester creation, as you can see from the screenshot above. Sounds interesting, right?įor this purpose, you have to have an account that is not a child account, and you should enable Family Sharing for this account. There was another option that I tried was creating a child sandbox tester account. According to Apple, there is one way to reproduce it programmatically using simulatesAskToBuyInSandbox property from SKMutablePayment class however, if you don’t have a native plugin that handles your in-app purchases, this might not be an option for you.
APPLE SANDBOX TEST USER ASKS FOR PARENT FULL
However, testing deferred purchases can get even trickier because I cannot reproduce a full deferred purchase flow on the sandbox environment yet. Managing this flow can be especially important if the target audience of your game is kids. Or you might want to test the Ask to Buy feature to get some deferred purchases on your game so that you can see how your game handles purchases that will be approved at a random time when parents approve their kid’s purchase request. Sadly, it is also possible that when you select the checkbox and try to save it, you will get an error which can be a blocker for your day. In that case, this can be quite a hassle because each time you want to reproduce an interrupted purchase, you have to select this checkbox again since it is noted that it will be automatically deselected if you agree to the updated terms and conditions. Suppose you are still in a development phase or you have a bug about this flow. When you select it, you will produce an interrupted purchase in your game, and you should see an updated terms and conditions popup during your payment. In general, testing with a sandbox environment is pretty straightforward until you want to test more specific scenarios such as Interrupted Purchases, Deferred Purchases, or subscriptions.įor example, if you want to test interrupted purchases, you need to select the checkbox on the test account details from App Store Connect. You can already start making purchases in your game with this account. If you want to test on a device with iOS version 11 or earlier, you need to switch the existing account logged into App Store to a sandbox account. However, if it is not the first time, you should see your sandbox account information on the Settings App Store menu at the bottom of the screen for iOS versions 12 or later. If it is the first time that you will test in-app purchases, you will be prompt to enter your username/password while you are paying. At this step, you need a new email if you already have an Apple account with your email since Apple request an email that is not registered before.Īfter creating the tester account, you can start testing your game. If you decided to test your game’s in-app purchases, the first thing you need to do is create a sandbox tester account from App Store Connect. If you are already familiar with the sandbox environment, you can skip to Test with Xcode Using StoreKit Configuration Files section. Then I will give a more detailed explanation to set up a local testing environment with StoreKit and Xcode. I would like to describe the testing process for the Apple sandbox environment shortly. Since it is a shared package for many games we have, it is used by many of our players, which makes it challenging to cover all edge scenarios.
APPLE SANDBOX TEST USER ASKS FOR PARENT SOFTWARE
I’m Seref, Software Engineer at the Core team in InnoGames, and I would like to introduce a new way of testing in-app purchases for iOS games in this blog post.Īt InnoGames, we have an internal payment module as a native iOS package and a native plugin for Unity. In that case, this blog post can help you to make the testing process smoother with StoreKit configuration files. Suppose you ever struggle with testing the payment flow of your iOS game with the Apple sandbox environment. What if you want to test the “Ask to Buy” feature and you need a child sandbox account? How did you feel when you realize that you cannot invite a sandbox user again if you deleted it accidentally? Have you ever get bored of creating a new email address for every new Apple sandbox account?