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をセットすることで対応できた。
自分のアプリで特定の言語でのみ起動できないバグがあった
自分のアプリで特定の言語でのみ起動できないバグがあった。
具体的にはタイ語の人だった。
最初自分の手元では再現せず全然原因が分からなかったが、自分のスマホの言語設定をタイ語にして試してみたら再現した。
2021/09/08 10:51:10.871 13160 13341 Error Unity ArgumentOutOfRangeException: Not a valid calendar for the given culture. 2021/09/08 10:51:10.871 13160 13341 Error Unity Parameter name: value 2021/09/08 10:51:10.871 13160 13341 Error Unity at System.Globalization.DateTimeFormatInfo.set_Calendar (System.Globalization.Calendar value) [0x00000] in <00000000000000000000000000000000>:0 2021/09/08 10:51:10.871 13160 13341 Error Unity at System.Globalization.CultureInfo.get_DateTimeFormat () [0x00000] in <00000000000000000000000000000000>:0 2021/09/08 10:51:10.871 13160 13341 Error Unity at System.Globalization.CultureInfo.GetFormat (System.Type formatType) [0x00000] in <00000000000000000000000000000000>:0 2021/09/08 10:51:10.871 13160 13341 Error Unity at System.Globalization.DateTimeFormatInfo.get_CurrentInfo () [0x00000] in <00000000000000000000000000000000>:0 2021/09/08 10:51:10.871 13160 13341 Error Unity at System.DateTime.ToString () [0x00000] in <00000000000000000000000000000000>:0
というようなエラー。DateTimeをToString()するときに出ていたようだ。
今までもTryParseで死ぬことはあったが、ToString()でもあかんとは知らなかった。
とりあえずテキトーなCultureInfoを作ってToString()の引数に渡すことで回避できました。
static public readonly System.Globalization.CultureInfo StandardCulture = new System.Globalization.CultureInfo("en-US");
Data.SaveDateTimeString = DateTime.UtcNow.ToString(@"yyyy/MM/dd HH:mm:ss ddd", StandardCulture);
P.S
以下のような解決方法もあるらしい。ライブラリの中身で死ぬこともあるから、こちらのほうが対応としては良さそう。バイナリサイズもほとんど増えなかった。
issuetracker.unity3d.com
link.xmlに以下を記述して、Assets以下に置いておくだけ。
<linker> <assembly fullname="mscorlib"> <namespace fullname="System.Globalization" preserve="all"/> </assembly> </linker>
Shader error in 'Hidden/PostProcessing/FinalPass': Input signature parameter (1-based Entry 3) type must be a scalar uint. at line 44 (on gles)
Android版をビルドすると以下のようなエラーが出て困ってました。
Shader error in 'Hidden/PostProcessing/FinalPass': Input signature parameter (1-based Entry 3) type must be a scalar uint. at line 44 (on gles)
Player Settings -> Other Settingsの「Auto Graphics API」のチェックを外すとビルドが通ります。
しかししばらくするとまたエラーが出ます。エラーが出たら先の項目のチェックを戻すとエラーを回避できます。
チェックを入れたらもしくは、はずしたら回避できるというわけではなく切り替えてしばらくはエラーが出ないという...
で、ちゃんとした解決策としてUnityの方に教えてもらったのですが、PostProcessing 3.1.0にしたら直りました。
以下の修正ですね。
Could not collect Google Advertising ID というエラーが出て、広告がちゃんと出ない
以下のようなエラーが出た。
[DataCollector] Could not collect Google Advertising ID - this will negatively impact your eCPMs! Please integrate the Google Play Services SDK into your application. More info can be found online at http://developer.android.com/google/play-services/setup.html. If you're sure you've integrated the SDK and are still seeing this message, you may need to add a ProGuard exception: -keep public class com.google.android.gms.** { public protected *; }
com.google.android.gms.common.GooglePlayServicesIncorrectManifestValueException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 12451000 but found 8298000. You must have the following declaration within theelement:
at com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@17.6.0:32)
at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(com.google.android.gms:play-services-basement@@17.6.0:2)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza(Unknown Source:17)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.zza(Unknown Source:17)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source:47)
at com.applovin.impl.sdk.m.c(Unknown Source:15)
at com.applovin.impl.sdk.m.j(Unknown Source:2)
at com.applovin.impl.sdk.e.f.run(Unknown Source:6)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
ちなみにメディエーションツールにはMAXを使っている。
mBaaSとしてNCMBを使っているのだけれど、そちらをインストールしたときに、Plugin/Android/res/values/version.xmlが追加され、そこに
8298000
という記載があった。ここに書かれた数値を、8298000から12451000に変えたらエラーが出なくなりました。