Hello,
Providing this class:
class MyClass {
int value;
}
j2objc generates something like this (extract):
@interface MyClass {
@public
jint value_;
}
With this implementation myClass.value_ is unaccessible in an easy way in swift (according to
https://stackoverflow.com/questions/26082999/accessing-objective-c-base-classs-instance-variables-from-a-swift-class )
I found that the @Property annotation will do the job like this:
class MyClass {
@Property
int value;
}
after generation:
@interface MyClass {
}
@property jint value;
However, it may be a big work to add this annotation everywhere in the code.
My question is :
As it seems to be the only way to access members by swift, is there a particular reason
for which public members in java classes are not automatically declared @properties when using
the --swift-friendly flag?
I'm pretty new on iOS dev, so I may say some mistakes....
BTW, j2objc is a F.... awesome cool project! Nice job. ;)
Regards
Julien