ExecutionEngineException: Attempting to JIT compile method '(wrapper dynamic-method)

ExecutionEngineException: Attempting to JIT compile method '(wrapper dynamic-method) MainScript:MainScript$purchaseSuccessful$System.String$System.String$System.Int32 (object,object[])' while running with --aot-only.

  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0 

...etc etc..

I get this in Xcode - is it to do with untyped variables in JS or something else?

To answer my own question! - after putting #pragma strict in all my .js files and altering my code to work with this, it went away.
Perhaps it should be enforced somehow in iOS dev?

However when using #pragma strict is it possible to do function pointers (which don’t have a type I know of)?