0

I have a set of java beans that are annotated with @XmlRootElement from javax.xml.bind. When trying to import the .h files in my XCode project, I get the error 'javax/xml/bind/annotation/XmlTransient.h' file not found Preferably I would like to ignore those annotations because i do not need them in my objective C code, but if there is another solution I would welcome it!

Thank you!

Andrei F
  • 4,205
  • 9
  • 35
  • 66

1 Answers1

0

You'll need to translate these annotation types and link them into your app, since XmlTransient has RUNTIME retention. j2objc ignores annotations that have SOURCE or CLASS retention, but has to translation RUNTIME annotations since the compiler has no way of knowing whether your app (or a library dependency) needs to reference it at runtime.

For what it's worth, you should suspicious of any use of JavaEE classes in a mobile app. JavaEE classes are designed for a server environment, and the closure of all their dependent classes can take up more memory than is appropriate for an Android or iOS app. Just because some Java code can be used in a mobile app, doesn't mean it necessarily is a good choice for that environment.

tball
  • 1,984
  • 11
  • 21