菜鸟教程小白 发表于 2022-12-13 14:19:05

ios - 如何在不发布应用程序本身的情况下测试我的第一次应用内购买?


                                            <p><p>好的,我怀疑这个问题的答案很简单。但是这里...</p>

<p>我正在提交我的应用程序。即使我的应用内购买集成尚未经过测试,我仍要提交审核。这本质上是因为如果 IAP 项目尚未提交/验证,我将无法检索我的 IAP 项目列表。所以在我看来,这就像“先有鸡还是先有蛋”的情况。</p>

<p>我的计划是提交应用程序和第一个 IAP 项目。然后我假设这将允许我在运行应用程序时神奇地检索 IAP 项目。</p>

<p>我是否正确地处理了这个问题,还是有更直观/更简单的方法来测试 IAP 检索过程(以及检索后要测试的许多其他事情)?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>根据 <a href="https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html" rel="noreferrer noopener nofollow">Apple&#39;s Documentation</a> :</p>

<blockquote>
<p>To perform testing for in-app purchase products Set up test user
accounts within Users and Roles in iTunes Connect, as detailed in
<a href="https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SettingUpUserAccounts.html#//apple_ref/doc/uid/TP40011225-CH25-SW10" rel="noreferrer noopener nofollow">Creating Sandbox Tester Accounts</a> in <a href="https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/About.html#//apple_ref/doc/uid/TP40011225" rel="noreferrer noopener nofollow">iTunes Connect Developer Guide.</a></p>

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

<p>Clear any account information stored on your test device.</p>

<p>In Settings, go to the Store settings. Click the Sign Out button. This
prevents an actual user account from automatically being used when
testing.</p>

<p>Important: Don’t enter your test account information in the Store
settings panel. Doing so may invalidate your test account. Connect
your test device to your Mac.</p>

<p>In Xcode, set your test device as your scheme’s destination.</p>

<p>Open your app, and perform your in-app purchase product testing.</p>

<p>Use your test account credentials to test the purchase.</p>

<p>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.</p>

<p>No financial transaction takes place, but a receipt is generated for a
successful transaction.</p>
</blockquote>

<p>这很简单,只需进行一些设置。祝你好运!</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在不发布应用程序本身的情况下测试我的第一次应用内购买?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/40229133/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/40229133/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在不发布应用程序本身的情况下测试我的第一次应用内购买?