Questions tagged [j2objc]

J2ObjC is an open-source command-line tool from Google that translates Java code to Objective-C for the iOS (iPhone/iPad) platform.

J2ObjC is an open-source command-line tool from Google that translates Java code to Objective-C for the iOS (iPhone/iPad) platform.

137 questions
0
votes
1 answer

J2ObjC JavaUtilHashMap Not Showing in Swift

I have an object with HashMap called metadata (of type HashMap), which I'm using in a Swift app. All of the other properties of the object are accessible through Swift (via the bridging header), but metadata is not. Is there…
Adam Colvin
  • 751
  • 1
  • 6
  • 16
0
votes
1 answer

how can I have kxml2 in j2objc package?

the kxml2 package is in the j2objc source tree (1.3.1) enter link description here but I cannot find the kxml2 supported after compile j2objc. Studied from a forum explanation enter link description here, seems like these classes aren't part of the…
SamTT
  • 19
  • 6
0
votes
1 answer

How to change a file generated by J2Objc

Hello I have been trying for a while to changue the url from a file .m generated by the tool j2objc but xCode seems to not notice it, when I recompile the whole project it's still pointing to the url generated from the java file. Could you help me…
dicarlomagnus
  • 576
  • 4
  • 17
0
votes
1 answer

I'm instantiating from Swift non-ARC Objective-C classes transpiled from Java (J2ObjC), is it leak-safe?

I'm using J2ObjC for a project. I did setup everything and included my Java classes. Only note is that I had to disable ARC because otherwise my Java codebase would not transpile/compile. (J2ObjC itself is recommended with arc disabled) Since I…
BlackBox
  • 631
  • 1
  • 5
  • 19
0
votes
1 answer

Some Objective-C methods are invisible in Swift 3

Why this method + (instancetype)arrayWithNSData:(NSData *)data; in j2obj project https://github.com/google/j2objc/blob/master/jre_emul/Classes/IOSPrimitiveArray.h#L252 invisible for Swift3? but the other are visible. for example this: +…
Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
0
votes
1 answer

J2ObjC with source jar file

I need to translate itext source jar to objective c using J2ObjC. I use the Xcode Build rules at here . But when I add this script "${J2OBJC_HOME}/j2objc" --build-closure -d ${DERIVED_FILES_DIR} -sourcepath "${PROJECT_DIR}/" --no-package-directories…
ldt25290
  • 43
  • 2
  • 8
0
votes
1 answer

Translate Android Studio Java code to Objective-C with j2objc,Is it possible?

I've tested j2objc by translating simple HelloWorld Java code to Objective-C, and that's ok. Next, I've tried to convert Java code that was written in adroid studio with GUI translate to Objective-C. But it doesn't work and give me error. How can I…
hupaa
  • 33
  • 1
  • 8
0
votes
1 answer

How to set up Apache Commons Logger

Anyone knows how to setup Apache Commons Logger? It seems like people got it running, but I'm failing miserably. My current setup is quite simple: build.gradle: compile('commons-logging:commons-logging:1.2') j2objcTranslation…
LambergaR
  • 2,433
  • 4
  • 24
  • 34
0
votes
1 answer

j2objc command not found

I am trying to convert an android studio project to an iOS app. I have downloaded j2objc and it is in my downloads folder and I have unzipped it. The next step here: http://j2objc.org/docs/Getting-Started.html says that I can just type in j2objc +…
kmindspark
  • 487
  • 1
  • 7
  • 18
0
votes
1 answer

How to link JRE.framework in swift framework

I create a swift framework with objectiveC code which are translated by j2objc. I have add java files to compile source, and use the following setting: GENERATED_FILES_DIR = "${SRCROOT}/Generated"; HEADER_SEARCH_PATHS =…
Leo
  • 835
  • 1
  • 12
  • 31
0
votes
1 answer

Exclude all tests that end with Test.java in j2objc

I am struggling to run only tests that end with *Test.java and have this in my configs but test runner does not pick anything with this config, am I missing something? testPattern { include '**/*Test.java' }
Taras Leskiv
  • 1,835
  • 15
  • 33
0
votes
2 answers

"Referenced from" errors when building with j2objc

I'm seeing a lot of errors, upwards of 170, when building my j2objc integrated project. I think the java j2re library is correctly being located and the linking step…
Mark Reid
  • 2,611
  • 3
  • 23
  • 45
0
votes
1 answer

Multiple java project to be converted in J2Objc

I have a java project "shared" which is my main project and another java project "core". In "shared" project, it has some classes that implements interfaces from "core" project. So i want all the classes from "core" as well as form "shared" get…
Hitesh
  • 59
  • 4
  • 15
0
votes
2 answers

J2Objc, Protobuf nano and Swift

I have Java classes being translated to Objective C (J2Objc using the cradle plugin). The simple Android app and Unit tests work fine. The same simple Objective C iOS app also works perfectly. However, when I try to write similar code in a Swift…
Gjchoza
  • 187
  • 1
  • 7
0
votes
1 answer

Can j2objc be used for generating Objective C code not for iOS?

We need to convert some Java code to Objective C for MacOS and Linux. While in general Objective C can be compiled on those platforms, the question is - does the code, generated by j2objc, depend on anything specific to iOS, or it can be compiled…
Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121