pkirill
(Kirill Prazdnikov)
January 27, 2017, 10:15am
1
Probably I don’t understand how to overriding NS classes,
I`m getting this error only on emulator:
gistfile1.txt
art I 87886 3588615 /Volumes/SSD/gh-moe-master-1.3.0-beta-2/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/kirill/Library/Developer/CoreSimulator/Devices/1CF5E647-E409-4F7C-80D1-BEDC10300432/data/Containers/Bundle/Application/C2BBEFF2-1E0F-408A-87BE-2C69F75F0C74/CospacesStudioDev.app/application.jar:/Users/kirill/Library/Developer/CoreSimulator/Devices/1CF5E647-E409-4F7C-80D1-BEDC10300432/data/Containers/Bundle/Application/C2BBEFF2-1E0F-408A-87BE-2C69F75F0C74/CospacesStudioDev.app
/Volumes/SSD/gh-moe-master-1.3.0-beta-2/moe/natj/natj/src/main/native/natj/NatJ.cpp:353 DEBUG: Method 'boolean java.lang.reflect.Method.isDefault()' is not accessible.
Application homeDir = /Users/kirill/Library/Developer/CoreSimulator/Devices/1CF5E647-E409-4F7C-80D1-BEDC10300432/data/Containers/Data/Application/1325B670-E78A-4AC9-BFED-C397E2D48245/Documents
systemVersion = 10.2, x86_64
bundleId = delightex.cospaces.studio.dev
build = 1
model = iPad
/Volumes/SSD/gh-moe-master-1.3.0-beta-2/moe/natj/natj/src/main/native/natj/ObjCRuntime.mm:1481 WARNING: Binding class refers to class \255\276\364\363gݺpY, but it can not be found. Fallback to indirect super class.
2017-01-27 13:08:13.315 CospacesStudioDev[87886:3588615] -[NSObject isGyroAvailable]: unrecognized selector sent to instance 0x610000004050
Uncaught exception found...
This file has been truncated. show original
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
liliomk
(Kristóf Liliom - Migeran)
January 27, 2017, 11:15am
2
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
pkirill
(Kirill Prazdnikov)
January 27, 2017, 12:05pm
3
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 ?
pkirill
(Kirill Prazdnikov)
January 27, 2017, 12:07pm
4
But the same app works ok on iPad device.