Crash on emulator

Probably I don’t understand how to overriding NS classes,

I`m getting this error only on emulator:

On real device the program works.

This is how the classes looks like

What is the correct way to Nat-register classes derived from a NsClass (UIViewController, e.t.c) ?

Thanks

Dear Kirill Prazdnikov,

your binding looks fine. There is a warning saying “Binding class refers to class” but sadly because of a bug in NatJ the name of the class is clobbered.

But because isGyroAvailable is a method of CMMotionManager, and the failure is unrecognized selector sent to instance, I think you don’t have CoreMotion framework linked in your project.

Best Regards,
Kristóf

Why Im gettig
java.lang.RuntimeException: Java object construction error!
at org.moe.natj.objc.map.ObjCObjectMapper.objectToJava(ObjCObjectMapper.java:416)
at org.moe.natj.objc.map.ObjCObjectMapper.toJava(ObjCObjectMapper.java:499)
at org.moe.natj.general.NatJ.toJava(NatJ.java:1053)

And how to fix ?

But the same app works ok on iPad device.