I am currently porting a .NET codebase in MonoTouch and I\'m currently working on a method that receives an Expression
. I\'m trying to compile it, and then
Not familiar with System.Linq.Expressions, but presumably it involves runtime code generation.
There is no JIT in iOS, all code must be compiled ahead-of-time. The same restriction does not apply in the simulator, hence your code runs there.
See here.
The Compile()
method is not supported on the iOS device, since the device prevents the JIT engine from running. Compile itself is implemented using System.Reflection.Emit and this in turns requires a functioning JIT. So the above code would never wor kwith expression trees.