Keystore file '.../Temp/gradleOut/launcher/○○○.keystore' not found for signing config 'release'. See the Console for details. というエラーが出る。

古いプロジェクトを最新のUnityにバージョンアップして、Androidビルドしたところ、

Keystore file '.../Temp/gradleOut/launcher/○○○.keystore' not found for signing config 'release'. See the Console for details.

というエラーが出て困っていたのだけれど、Player Settingsで、keystoreをブラウズから選択し直したらビルド通りました。

OdinにDictionaryのSerializeを任せてたらエラーが出た

実機でうまく動かないアプリがあってログを確認すると以下のようなエラーが出ていた。

Creating a serialization formatter for the type 'System.Collections.Generic.Dictionary' failed due to missing AOT support.

Please use Odin's AOT generation feature to generate an AOT dll before building, and MAKE SURE that all of the following types were automatically added to the supported types list after a scan (if they were not, please REPORT AN ISSUE with the details of which exact types the scan is missing and ADD THEM MANUALLY):

System.Collections.Generic.Dictionary (name string: 'System.Collections.Generic.Dictionary`2[[EUserProperty, Assembly-CSharp],[UnityEngine.Sprite, UnityEngine.CoreModule]], mscorlib')
EUserProperty (name string: 'EUserProperty, Assembly-CSharp')
UnityEngine.Sprite (name string: 'UnityEngine.Sprite, UnityEngine.CoreModule')

IF ALL THE TYPES ARE IN THE SUPPORT LIST AND YOU STILL GET THIS ERROR, PLEASE REPORT AN ISSUE.The exception contained the following message:
Attempting to call method 'Sirenix.Serialization.DictionaryForma
ExecutionEngineException: Attempting to call method 'Sirenix.Serialization.DictionaryFormatter`2[[EUserProperty, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[UnityEngine.Sprite, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::.cctor' for which no ahead of time (AOT) code was generated.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at Sirenix.Serialization.FormatterLocator.GetFormatterInstance (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
at Sirenix.Serialization.FormatterLocator.CreateFormatter (System.Type type, Sirenix.Serialization.ISerializationPolicy policy) [0x00000] in <00000000000000000000000000000000>:0
at Sirenix.Serialization.FormatterLocator.GetFormatter (System.Type type, S


丁寧に Please use Odin's AOT generation feature とあるので、それに従う。

Tools > Odin Inspector > Preferences > AOT Generation.

とたどっていくと、以下のような画面に、

f:id:wkpn:20201209130516p:plain

ここにあるAutomate Before Builds にチェックを入れることでエラー対処できました。

Unity Cloud BuildでできあがったiOS版ビルドがインストールできない

Unity Cloud Buildで出来上がったiOSバイナリをインストールしようとしたのですが、「Detect Device」というボタンを押すと、また同じ「Detect Device」のボタンのあるページに戻ってきて一向にインストールできないという現象に遭遇。

たまに 404 Page not found になるときも。

プロヴィジョニングファイルを更新してみたり、ブラウザや端末を再起動してみたり、他のブラウザを試してみたりしたけどうまくいかず。

解決した方法

Unity 開発者ギルドの方にアドバイスを頂き、

iPhoneの設定 -> Safari -> 履歴とWebサイトデータを消去

で履歴を消したらうまくいきました。

MacOS CatalinaでiTunesがなくなったけどどうやってiPhoneのUDIDを確認するの?

Finderからわかるらしいです。iPhoneをつなぐとFinder上にiPhoneを選ぶところが出ますね。そこをクリックすると下記のような画面になります。

f:id:wkpn:20201106175841p:plain

そうした上で、iPhone11Pro Max 247.56GB って書いているあたりをクリックするとUDIDなどのIDが出てきます。

f:id:wkpn:20201106175847p:plain

参考:
discussions.apple.com

MacOS CatalinaでiTunesがなくなったけどどうやってiPhoneのUDIDを確認するの?

Finderからわかるらしいです。iPhoneをつなぐとFinder上にiPhoneを選ぶところが出ますね。そこをクリックすると下記のような画面になります。

f:id:wkpn:20201106175841p:plain

そうした上で、iPhone11Pro Max 247.56GB って書いているあたりをクリックするとUDIDなどのIDが出てきます。

f:id:wkpn:20201106175847p:plain

ERROR ITMS-90503 と出てアプリをApp Storeにアップロードできない

フルメッセージとしては以下のようなのが出た。

ERROR ITMS-90503: "Invalid Bundle. You've included the "arm64" value for the UIRequiredDeviceCapabilities key in your Xcode project, indicating that your app may only support 64-bit. Your binary, 'com.nukenin.hogehoge', must only contain the 64-bit architecture slice. Learn more (https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3)."

以下の動画にUnityでの対策が載っていた
youtu.be

Player Settings の ArchitectureがUniversalになっているところをarm64に設定すると良いらしい。
調べてみると、armv7を使っていたiPhoneは2013年発売のiPhone 5cまでで、それ以降はarm64のようなので、ほぼ問題ないでしょう。


forum.unity.com
↑これをみると、 2019.4.13f1で直るっぽいことが書いてあった。

追記
arm64に設定しても、ビルド中に何故かUniversalに変更されてしまう...
どうも、自分の入れているあるパブリッシャーから提供されたプラグインの中で、

PlayerSettings.SetArchitecture(BuildTargetGroup.iOS, 2);

とされている部分があったのでこれが原因っぽい。

今回は、XCodeで、Required device capabilites からarm64を取り除くことで一応解決できた。