Create AOT checklist for IOS (ExecutionEngineException)

Hi to All,

Deploying C# code to IOS recently became a nightmare for me.
All started with an ExecutionEngineException whan I tried do deploy my game to the IPAD, and I used a mature well unit tested assembly of mine (NOTE: It does not matter if the code is in external assembly or simply in your scripts folder)

In past the few days I did my homework, and discovered the dozens of ExecutionEngineException related questions. As I learn there is no magic solution here, only to workaround the specific code.

Now here is the problem: Suppose you have a well unit tested code. (for example a game AI or anything which is not related directly to the UnityEngine) This will turn to a minefield when running on IOS. You can not know, nor unit test which part of code will break.

This ruins all my ideas about software quality and testing…

We must find a solution here. Ideally we should run AOT-ed code in desktop against its unit test. I think it is not possible currently, please correct me if I am wrong.

As a backup plan we must create a detailed list, what kind of constructs not to use if targeting AOT-ed platform:

My experience so far:

  1. Using FirstOrDefault with value types
  2. Using Sum(customType =(gt) customType.Property)

Anybody has any idea about how to deal with this?


do you emit code dynamically