アプリなどを開発するブログ

React Native / Swift / Ruby on Railsなどの学習メモ。


iPhone で何度も「サインインが必要です [mail] のパスワードを入力してください」と表示される

現在調査中。

考えられる理由の1つは、finishTransactionでちゃんと終了できていないtransactionが存在すること。

参考記事

swift – itunes store にサインイン画面が何度も表示される – まとまりのないブログ

ただ、これは全部終了してるので問題なさそう。

英語の記事漁ってるとapple developerのフォーラムこんなページが。

forums.developer.apple.com

回答全文

Apple answered, but I already do what they say. I also do not want to reset my device. How am I supposed to solve this problem?

 

Answer :

<. I also created a sandbox account to test. But then I forgot the information of this account.>

Your issue may be due to one or more of the following reasons:

 

-You are running into a transient bug with the App Store. The workaround is restore the device to the latest iOS version. Note that doing so will reset your device to its factory default settings.
 

Create a new test user account in iTunes Connect. Make sure that you are signed out of the Store on your device before starting to test In-App Purchase on your device. Build and launch your app on your device, enter the new test user account when prompted by StoreKit to authenticate the purchase. Be sure to always use sandbox test user accounts created in iTunes Connect to test your In-App Purchase products. StoreKit connects to the sandbox environment when you launch your application from Xcode, from your test device (iOS), or from the Finder (OS X). It connects to a production environment for applications that were downloaded from the App Store. You must not use your test user account to sign into the production environment. This will result in your test user account becoming invalid. Invalid test accounts cannot be used to test In-App Purchase again.

-You may have an unfinished transaction.  As such, you need to call finishTransaction: on the associated transaction to end the loop to resolve your issue. See TN2387 In-App Purchase Best Practices > Add a transaction queue observer at application launch  and Finish the transaction for more information  on how to prevent this issue.

-You are calling SKReceiptRefreshRequest or restoreCompletedTransactions, which is prompting you to enter your username and password. If calling restoreCompletedTransactions, see When should I use SKPaymentQueue’ s restoreCompletedTransactions method? for more information. If calling SKReceiptRefreshRequest, that would be the expected behavior.

accounts and it works properly. Even though I am deleted from the sandbox , the account continues to ask. >

If your device still prompts you to log in with a deleted test user account, restore your device to the latest iOS version. Note that doing so will reset your device to its factory default settings.

Be sure to not restore your device’s back up. Make sure that you are signed out of the Store on your device before starting to test In-App Purchase on your device. Build and launch your app on your device, enter the new test user account when prompted by StoreKit to authenticate the purchase.