I'm trying to embed some MonoTouch code within an Objective-C program. I've got a very simple C# test library that contains a single static class with a single static method. The method is passed two integers, adds them together and returns the result. I've also got a simple Obj-C program that contains a view controller with a button on it. Pressing the button invokes a method that initializes Mono, calls the Add method in the C# library, and then cleans up Mono. Everything works just fine in the simulator, but I'm having no luck with running it on a device. I get an exception when I call mono_jit_init(). The exception is caused by an assertion in mono_arch_create_generic_trampoline() in tramp-arm.c. I've looked at the code, and the assertion is the only line in that function. It looks like the real function has been eliminated by the following: #ifndef DISABLE_JIT.
Has anybody had any success with embedding C# in an Obj-C program? Am I doing something wrong?
P.S. I'm using the include files and linking with the libraries from /Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr.