今までSandboxで課金テスト出来ていたのが、突如レシートの検証が失敗するようになった。
今までSandboxで課金テスト出来ていたのが、iOSのみ突如レシートの検証が失敗するようになった。
購入処理はうまくいくのにレシート検証で失敗するようで以下のようなエラーが出た。
Validation failed:/Client/ValidateIOSReceipt:iTunes Sandbox validation result:21003
(AuthnticationFailed) from https://sandbox.itunes.apple.com/verifyReceipt
最近変えたところといえば、アプリ内課金にサブスクリプションを追加したこと。
しかし追加しようとしているSubscription以外の、ジェムの購入でもエラーが出るようになってしまった。
レシートの検証にはPlayFabを使っている。
はてっ???
いろいろ調べ、知人に相談し、ようやく解決。
結論としてはPlayFabでアプリ共有シークレット(App-Specific Shared Secret)を設定したら解決しました。
1.App Store Connect でApp-Specific Shared Secretを作る。
2.上記で出来たキーをPlayFabで設定する。
How to upload to Unityroom
Preparation
Procedure
1. Log in to Unityroom
Access the Unityroom and press "New user registration / login" button on the upper right.
Please read the terms of use and if you agree to them, please authenticate through the Twitter button.
If you log in successfully, the header menu will change and you will see the Twitter icon.
2. Create a new game
Header-> Register Game
Enter the title, game ID and brief description, then press Register.
title
The title of the game.
Game ID
- This is a string that will be used as part of the URL.
- You are free to determine this.
- Only alphanumeric characters, hyphens, and underscores can be used.
If the registration is successful, you will be taken to the basic information edit screen.
Game setting items are lined up in the side menu.
It is not necessary to set everything in detail.
I will explain the only items which is essential here.
3. Icon registration
Sidebar "Basic information" menu
Select the icon to update. You can change the title and description as needed.
4. WebGL upload
Select the Unity version here. Please fill in the screen size, how to play, and memory usage as you like.
Upload the file output from Unity. Look carefully at the extension and make sure you select it correctly.
If the upload is successful, the screen will be refreshed and the file size etc. will be displayed at the bottom of the page.
5. Live Policy
App Store Small Business Programがちゃんと適用されているか確認する
何月から適用されてるんだ?っと思ったもののいつの間にかAppleから売上のInvoiceが届かなくなってたので、Invoiceから確認することができず色々模索した。
なんとかApp Store Connectから適用されていることが確認できた。
- 「App Store Connect」から「Payments and Financial Report」に行って適用されているかどうか知りたい月を選択
- 右上のCreate Reportsでレポートをダウンロード
- できたレポート(zip)を解凍して、中のtxtを開きCustomer Priceに対してPartner Shareの割合が85%だったら適用されている
※OSの言語設定を英語にしているので項目名が日本語設定だと違うかもです。
Library not loaded: @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics というエラーで苦しんだ
Macを乗り換えたせいか、広告プラグインを更新したせいかよくわかっていないのだけどプロジェクトをXCodeでビルドして実行すると以下のようなエラーが出るようになってしまった。
2021-11-24 21:33:35.760999+0900 Numpurr[13175:2902555] AppLovinQualityService top: AppLovinQualityService Client Version: 6.1.3 2021-11-24 21:33:35.761050+0900 Numpurr[13175:2902555] AppLovinQualityService top: AppLovinQualityService Device ID: 083AC1BC-097E-4A9C-9D0F-02B5D654321E 2021-11-24 21:33:35.863394+0900 Numpurr[13175:2902555] Error loading /var/containers/Bundle/Application/5E2D6B23-2032-49C7-A063-9023E1262887/Numpurr.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/5E2D6B23-2032-49C7-A063-9023E1262887/Numpurr.app/Frameworks/UnityFramework.framework/UnityFramework, 265): Library not loaded: @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics Referenced from: /private/var/containers/Bundle/Application/5E2D6B23-2032-49C7-A063-9023E1262887/Numpurr.app/Frameworks/UnityFramework.framework/UnityFramework Reason: image not found 2021-11-24 21:33:35.876414+0900 Numpurr[13175:2902555] Error loading /var/containers/Bundle/Application/5E2D6B23-2032-49C7-A063-9023E1262887/Numpurr.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/5E2D6B23-2032-49C7-A063-9023E1262887/Numpurr.app/Frameworks/UnityFramework.framework/UnityFramework, 265): Library not loaded: @rpath/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics Referenced from: /private/var/containers/Bundle/Application/5E2D6B23-2032-49C7-A063-9023E1262887/Numpurr.app/Frameworks/UnityFramework.framework/UnityFramework Reason: image not found
とりあえず、以下のようにプロジェクトファイルのFrameworks, Libraries, and Embedded ContentのところにFBSDKCoreKit_Basicsを追加することで解決できた。
ほぼフルカスタムのMacbook Pro 2019 16-inch VS ほぼフルカスタム Macbook Pro 2021 16-inch
MBP16inch 2021/M1 Max/Memory 64GB が届いたので、現在使っている MBP16inch 2019/Intel Core I9 2.4GHz/Memory 32GB とビルド時間を比較してみた。
ビルドしたのは、「にゃんばーカードWars」のプロジェクトファイル。
Unityは2020.3.8f1(Rosetta)。
※Apple Silicon対応のUnityはまだ安定してなさそうなので導入してません。
MBP 2019 16inch | MBP 2021 M1 Max 16inch | |
Unity Libraryフォルダ削除して起動 | 5:00 | 5:33 |
Switch Platform Android -> iOS | 6:06 | 8:03 |
Build Apk | 4:54 | 4:08 |
Build iOS | 4:00 / 11:00 | 1:59 |
XCode Build | 4:33 | 1:51 |
ゲーム起動 | 0:10 | 0:11 |
import系の処理は何故か未だにMBP2019の方が早かった。UnityがまだApple Silicon対応してないからかも。
対してXCodeでのビルドは爆速だった。
あと、MBP2019のUnityのiOSビルドは2回やったけど、そのうち1回はなんかむちゃくちゃ時間掛かった。ファンがめちゃくちゃ回っていたので熱が上がりすぎてなにかおかしなことになっていたのかもしれない。
M1 MAX版MBPはこんだけやって一度もファンの音が聞こえることはなかった。すごい。
ImageのtexOffsetがうまく動かない
maskしていると駄目らしい。
materialの代わりにmaterialForRenderingのmainTextureOffsetを利用することでうまくいった。
Awake時にDOTWeenのDOOffsetを使おうとしたが、それ機能しなかった。
materialForRenderingはどこかのタイミングで変更されてるんじゃないかと思う。
とりあえず、毎フレームmaterialForRenderingのmainTextureOffsetをセットすることで対応できた。