iOS In App Purchase: test a real purchase without submitting to Apple

后端 未结 4 1943
我在风中等你
我在风中等你 2020-12-05 04:52

I implemented in app purchase in my iOS app and I want to do a real test (not a sandbox) before submitting this new version to Apple Of course, the current version of the ap

相关标签:
4条回答
  • 2020-12-05 05:34

    To get access to the purchase you need apple signature, because you are connecting with the apple servers.

    I assume that your app, is doesnt have that signature, so your request goes to the sandbox.

    0 讨论(0)
  • 2020-12-05 05:35

    You can actually test the in-app purchasing in the sandbox environment, basically you'll need to set up an test user account in your iTunesConnect.

    Check the apple documentation here: http://developer.apple.com/library/ios/#technotes/tn2259/_index.html

    You'll be able to find all the information related to In-App Purchasing, including sandbox testing.

    0 讨论(0)
  • 2020-12-05 05:43

    Short answer: you can't test a real purchase (aka, spend real money). It isn't possible.

    Slightly longer answer: You'll automatically hit the sandbox environment unless it's an apple-signed release build. Even ad-hoc signed builds hit the sandbox.

    To test a new IAP: create your IAP (it will be in "needs approval mode" until submitted with the final build and test against the sandbox - that's fine). If your purchase works against the sandbox, it should work against prod with real money as well. It would be great to do a trial run with real money, but that's just not possible until the IAP is approved and you get the production signed version of the app from the app store.

    0 讨论(0)
  • 2020-12-05 05:45

    Just create a test account on iTunes Connect. Then log out from the device and run your app from Xcode.

    0 讨论(0)
提交回复
热议问题