"IOS" Apple IAP (internal purchase) sandbox account usage precautions

Source: Internet
Author: User

Pay Attention to the words of modesty and neglect2016.12.15 10:25* words 1828 read 16262 comments 155 likes Goal
    • How to use the sandbox account correctly
    • Precautions for Sandbox account usage
1. What is a sandbox account?

The iOS app uses the Apple in-app Pay (IAP) feature to be sure to perform functional testing before the project goes live. Testing is definitely needed, not to mention this is related to money ... After the development is complete, how to test it? Do I have to buy my own money to test an inside purchase function? Even if the company pays, but the apple to eat 30% of Ah, think if it is 99 knives of the goods, point to buy the heart is a bit nervous ...
Apple, of course, does not have such a hole, testing in-app purchases, Apple provides a sandbox account (also known as sandbox account) way. This sandbox account is actually a virtual AppleID, in the developer account backstage Itune connect configured after you can use the Sandbox account test in the purchase, with a sandbox account, you can experience a local tyrants feeling, game diamonds or anything casually charge, anyway, without my money.

Note: You can think of the sandbox account as a virtual AppleID, this appleid only carry out the internal purchase test function.

2. Sandbox Account Usage Prerequisites
    • Internal purchase of the product ID, price and other relevant information has been entered into the developer backstage (otherwise what you buy)
    • The developer backend has created a sandbox test account (how we will create it below)
    • You need to have a real machine (iphone or ipad is OK, don't use the simulator.) And it can't be a jailbreak machine.
    • Bundleid don't make a mistake, developer account, certificate, Bundleid to be consistent
    • If you are the first to integrate the in-app purchase function on this developer account, please fill in the Tax agreement on Itune Connect first, otherwise the product ID will be invalid when purchased.

Tax agreement problems many children's shoes have met, can refer to this article http://www.jianshu.com/u/62f0c72a2004

3. Sandbox account creation

Login to Apple Developer backend--itunes connect--users and functions-sandbox test technician, in this interface you can see the current account has been created a good sandbox account.

Sandbox Test Technician Management interface

Click "+" to create


Create a sandbox account the newly created sandbox account

, I create a sandbox account. Specific information:

    • Name is Test1
    • AppleID for [email protected](e-mail above)
    • APP Store area for China

Attention:

    • E-mail cannot be a mailbox that someone else has registered AppleID
    • e-Mail can be a non-existent e-mail (as long as the format, casual writing)
    • Do not choose the App Store area. While any area can be used for testing (and there is no area before the app is online), the pop-up purchase prompt will display the language according to the current AppleID (sandbox account) area in the sandbox test.
4. Sandbox Account Usage Process
    • 1. Install the test package on the iphone (must be a Adhoc signing certificate or develop signed certificate, not downloaded from the App Store)

    • 2. Exit the iphone App Store account (because we need to log in with a sandbox account).

      • How to: Open the App Store app first page swipe to the bottom--check appleid--Logout
      • Operation Method Two: Set--itunes Store with app store--check appleid--logout

You only need to exit the account, after exiting, do not need to login to the sandbox account here, because you can not login. As has been said before, the sandbox account is a fake AppleID account, can not directly login. If forced to log in, the following error message will appear:

Use the sandbox account to log in directly to the error prompt
    • 3. In the test package to buy goods, the system will let you login, here we click "Use the existing AppleID" can be entered just created a sandbox test account to log in.
Click on the purchase item appears login window Enter the sandbox account password to log in
    • 4. After entering your account, you may be prompted with the following, clicking OK will jump to the app Store, resulting in this purchase failure. Okay, let's go back to the test kit and buy the merchandise.
Tips for jumping to the store in the App Store

The reason for the prompt: Because AppleID is a sub-region. We saw it before we created the sandbox account, we need to select the region. The App Store is also a sub-region, and the corresponding AppleID can only be downloaded and purchased in the App Store's corresponding region. We just created the [email protected] This account of the region is China, so only in China store login. Because of my previous login account in Vietnam, so at this time AppStore storefront is a Vietnamese storefront. So this time we log in, the system will jump to the AppStore app to switch the storefront to China. In addition, when the App Store app switches regions, it will report "Your request produced an error". This doesn't need a tube.

    • 5. After clicking on the purchase item, a prompt will appear if successful.
Product content and Price Display window

Note: After we have created the product on itunes Connect, in addition to the product ID, product name, product description, price, etc., but also upload a picture, the image is the above interface.

Purchase Success Notification sandbox account considerations
    • Budleid, certificate, Product ID and other content consistent, in order to carry out the next stored value test (Bundleid is not right, what to play)
    • Test equipment need to use a non-jailbroken real machine (jailbreak machine can not be stored in the sandbox value, the simulator can not be stored in the sandbox value)
    • The sandbox account cannot be logged in directly from the App store, but only after you click on the purchase item and login in the popup login box.
    • Real AppleID can not be stored in the sandbox adhoc certificate and develop certificate package, so before the sandbox test, you need to exit the real AppleID account
    • Packages downloaded from the App Store cannot be stored using a sandbox account

Questions about the certificate:
1. Using the develop signing certificate and the Adhoc signing certificate to play the IPA package, I call them a test package, the test package can only use the sandbox account to store value, cannot use the real AppleID to store the value
2. From the App Store app download package, I call them the online bag, the online bag can only use the real AppleID to store the value, cannot use the sandbox account to store the value

Another nagging:
The landlord usually uploads the package when the IPA package, using Xcode inside the application Loader application upload application.
Although many people upload the package using AppStore's signing certificate, but in fact, the use of Adhoc Certificate Packaging of the IPA package can be uploaded and submitted to the online. I usually use ADHOC Certificate package into IPA package, test sister test, finished testing directly with this package upload. Hey.

"IOS" Apple IAP (internal purchase) sandbox account usage precautions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.