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
2
votes
1 answer

J2OBJC Xcode Build Rule with external java source

i'm using J2OBJC Xcode Build Rule Method to compile the the java source code to objective-C. https://github.com/google/j2objc/wiki/Xcode-Build-Rules However each time when there is changes in java source, i will have to manual copy it over to the…
kaneyip
  • 1,237
  • 1
  • 17
  • 21
1
vote
1 answer

No able to build J2ObjC

I have fulfilled the requirements for installing j2objc on my mac as follows: Apple macOC Catalina Version 10.15.7 Xcode Version 12.2 (12B45b) JDK 1.8 installed - JAVA_HOME=`/usr/libexec/java_home -v 1.8` JDK 11…
user12719663
  • 39
  • 1
  • 3
1
vote
2 answers

How j2ObjC works

I am here to have some clarifications on how j2ObjC works. I've developed my own app on android and now I'm trying to get into the world of IOS with less problems as possible. I heard of j2objc and I would know it's mechanism before I could use it.…
1
vote
1 answer

Sharing code between iOS and Android using Bazel and j2objc

I have a library with common code which uses android.util.Log: java_library( name = "common", srcs = glob(["*.java"]), ) And I have an j2objc rule for iOS which works just fine: j2objc_library( name = "common_ios", deps =…
Vitor Pereira
  • 77
  • 1
  • 9
1
vote
1 answer

Why does SHA-256 message digest give different result in j2objc?

I'm getting a different result when running my code in Java and j2obc. My java code looks like this: import java.security.DigestException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import…
Mark
  • 4,749
  • 7
  • 44
  • 53
1
vote
1 answer

how to use .jar libraries in objectiveC ios Project Using j2objc?

the goal is make an ios app with this features: -download a source code file as a text and compile or interpret at runtime -this Plain Text source code needs to capable of UI Manipulation , Os and Hardware functionality access. i have done the exact…
Mrjm
  • 121
  • 2
  • 10
1
vote
3 answers

How to install or setup j2Objc in android studio steb by step

How to use j2objc in android studio? I did not find any manual. How to implement and work with j2objc in android studio? I'm a junior in java language, and I wrote one app for android, and now I need convert this app for iOS. It's a simple app. I…
1
vote
1 answer

J2ObjC - Android Libraries

I'm trying to convert my Android project to an Objective C project with J2ObjC. So far, I managed to convert all my files which are not using any libraries. However, every class which uses a library receives an error. For example: error: package…
Guido
  • 1,161
  • 3
  • 12
  • 33
1
vote
2 answers

j2objc exception prevents unit tests running

I'm working on an app that uses a cocoapod, which has been built using j2objc. But when I try to run unit tests in Xcode I see the following error: Terminating app due to uncaught exception 'JavaLangArrayStoreException', reason: 'source of type…
Adam Colvin
  • 751
  • 1
  • 6
  • 16
1
vote
1 answer

Java | Json String to Object without library

I want to convert a Json String to an object, without out a library. The reason is that I want to convert the Java code with J2Objc into a Objective-C file. And J2Objc doesn't allow libraries as far as I know. Does anyone know an answer to this…
user6586661
  • 432
  • 1
  • 11
  • 24
1
vote
1 answer

Converting Android apps to ios apps

I developed an Android app which I want to convert it to ios app. I have seen that J2OBJC helps in converting java code to C code. Can anyone please help me out how to do that. And the other doubt I have is : Using J2OBJC we can just only convert…
srisindhu saride
  • 391
  • 6
  • 25
1
vote
1 answer

Using j2objc in swift framework(not static library)

I want to import files which are translated by j2objc in Cocoa Touch Framework in Xcode, and get some error. My implementing steps as the following: In PeopleProject -> Pepole.java: class Pepole{ ..... } Create a…
Leo
  • 835
  • 1
  • 12
  • 31
1
vote
1 answer

How to use enum in j2Objc

I define a enum named SexType, and want use as the following: public class People { //@Property("copy, nonatomic") protected String location; // @Property("copy, nonatomic") protected SexType sex; public String name; public SexType…
Leo
  • 835
  • 1
  • 12
  • 31
1
vote
1 answer

Didn't add libz.dylib. Still how is it working?

I made a sample POC for integration of j2objc following http://j2objc.org/docs/Xcode-Build-Rules.html#adding-a-j2objc-build-rule. My POC works great but what I don't understand is I haven't added libz.dylib in Link phase and still it's working…
Divyansh Singh
  • 390
  • 4
  • 16
1
vote
1 answer

maven - j2objc - No goals have been specified for this build

I am trying to build j2objc but get the next error when I issue a make dist command: [ERROR] No plugin found for prefix 'dependency' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the…
Lera Zemlyanaya
  • 115
  • 3
  • 14
1 2
3
9 10