超お父さんの日記

日記とか雑談とか、スノーボードとか、サーフィンとか、たまに技術系とか。

どハマりしたiOSアプリ内課金リジェクトの話

つい先日リリースしたアプリの審査ですんごいハマった。 初めは課金周りだけじゃなく、スクショとか3つくらいの理由でリジェクトされて
課金はsandboxのテストでは何も問題なかったし、課金のリジェクト理由は謎だったし、 あらあらくらいの気持ちで課金の指摘以外を修正して再申請を出した。

そしたらまたリジェクト。
無視した課金部分の理由が残った形だ。

Guideline 2.1 - Performance - App Completeness
We found that your in-app purchase products exhibited one or more bugs when reviewed on iPad running iOS 13.4 on Wi-Fi. Specifically, we were still unable to make any in-app purchases at the time of review.
Next Steps
When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple's test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.
Resources
You can learn more about testing in-app purchase products in your development sandbox environment in App Store Connect Developer Help. For more information on receipt validation, please see What url should I use to verify my receipt? in the In-App Purchase FAQ. Learn how to generate a receipt validation code in App Store Connect Developer Help.

レシート検証について言われてるけど、そんなこと知ってるし、当然やってる。
sandboxテストでは問題なく課金できるし、いったい何を修正したら良いのかと。

あと厄介なことに課金アイテムまで!マークついて「デベロッパの対応が必要」という謎ステータスになってるし。。
ググってみると課金アイテムを作り直すとかいう記事が出てきた。
(結果的にはこれは不要でした。参照した記事以降に作り直さなくても大丈夫になったのかな?*1setohide.blogspot.com 今回のアプリは消耗型と自動更新サブスクリプションがあって、結構な数の課金アイテムあるから作り直しはまぁまぁ面倒だ。。
藁にもすがる思いで作り直して、入念にsandboxテストをして再申請したりしてみた。
が、無情にもリジェクト。

エラーのログをCrashlyticsに記録するようにして再申請してみたり。
もちろんリジェクトだけど、何か情報が得られるかもしれないと。
しかしそれも無駄だった。何もエラーは記録されなかった。

問題解決センターでレビュワーに箇条書きで質問してみるも
まさかの質問全無視の返事がきた。

Hello,
Thank you for your reply.
During our review, we found that your app displayed an error when attempting to purchase the in-app purchase product(s). While we cannot provide technical assistance or the Apple account associated with the reported issues, we have put together the following resources which discuss common issues seen in apps during review.
To start, please review the App Testing Guide, which gives an overview of how to test your app to minimize the chances of issues occurring during review.
You may also want to review Designing for Real-World Networks, as all apps are reviewed on-device and in an environment that replicates real-world use of your app.
We hope that the above is useful in your revision process, and we look forward to reviewing your revised and resubmitted app.
Best regards,
App Store Review

こんな返事きたら、よしこばりに「クソがっ!」って叫んじゃうよ。

そんなこんなでもう打つ手なしかと思われた時、デベロッパーフォーラムで気になるやりとりを発見。

I learned that Apple introduced some new contact information requirements silently in App Store Connect "Payment / Tax / Banking" section. I added all the required information until everything looked green again. forums.developer.apple.com

むむむっと思って、確認してみると同じ状態だった! f:id:hirokim412:20200405155118p:plain

怪しいことは何でもいいから潰しておこうと思い、
連絡先情報をクライアントに入力してもらいイエローをグリーンにしてもらって、アプリの方は何も変更せず再申請。

そしたら審査通過!!!
大変良い経験になりました。
ありがとうございました。

*1:課金アイテムの「デベロッパの対応が必要」になった場合の作り直しは不要でした。 どれか1つ課金アイテムの情報を適当に更新して保存すると全ての課金アイテムが「審査待ち」ステータスなり、 その状態でアプリを再審査に出して通りました。