天天看點

沙盒測試賬号:不允許建立 iTunes 賬戶

1.出現情況

沙盒測試賬号:不允許建立 iTunes 賬戶

不允許建立 iTunes 賬戶.jpg

在設定裡登陸沙盒賬号提示:

不允許建立 iTunes 賬戶

此 Apple ID 目前無法用于 iTunes Store, 請稍後重試

正确方式:

沙盒測試賬号隻能在測試應用點選儲值時,彈窗中輸入賬号,不能在設定裡的 App Store 裡添加。

蘋果的文檔也有說明,測試賬号不能在設定裡登陸 :

Important: Don’t enter your test account information in the Store settings panel. Doing so may invalidate your test account.

2. 正确的沙盒測試流程

To perform testing for in-app purchase products
  1. Set up test user accounts within Users and Roles in iTunes Connect, as detailed in Creating Sandbox Tester Accounts in iTunes Connect Developer Guide

    .

    You’ll need a test user for each territory you want to test the app in.

  2. Clear any account information stored on your test device.
  • In Settings, go to the Store settings.
  • Click the Sign Out button.

    This prevents an actual user account from automatically being used when testing.

  1. Connect your test device to your Mac.
  2. In Xcode, set your test device as your scheme’s destination.
  3. Open your app, and perform your in-app purchase product testing.
  4. Use your test account credentials to test the purchase.

    When your app uses the Store Kit API to request a payment, you’re asked to sign in. Select Use Existing Account and enter your test account user name and password. You are then asked to confirm the purchase. The transaction completes.

    No financial transaction takes place, but a receipt is generated for a successful transaction.

參考:

注:本文首發于 iHTCboy's blog ,如若轉載,請注明來源。