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: How to translate own type

I want to create class-adapter for platform specific code. For example, there are 2 classes: Java: class SQLiteAdapter { public void executeSql() { //use android.database.sqlite } } Objective C @interface SQLiteAdapter : NSObject…
CruorVult
  • 823
  • 1
  • 9
  • 17
0
votes
0 answers

How do I use j2objc to convert my android app to ios?

I have been searching for the past days on a tutorial on how to use https://developers.google.com/j2objc/guides/getting-started to convert my Android App (I have the source code) to IOS and I have found nothing. If I try to convert individual .java…
zeeks
  • 775
  • 2
  • 12
  • 30
0
votes
1 answer

Working make file example

Sorry to appear so basic in this place. 1/ Shall I use both a make file and build settings + build phases, or alternatively a make file or build* ? 2/ There is two examples of make files in the wiki docs but neither of them is working. So could you…
0
votes
1 answer

Why doesn't J2ObjC translate field with @Weak as __weak but __unsafe_unretained?

As we know, __unsafe_unretained is not as safe as __weak, so why doesn't J2ObjC translate field with @Weak as __weak but __unsafe_unretained?
Piasy
  • 989
  • 13
  • 35
0
votes
1 answer

When Compiling with j2objc: javax.* packages are not found

When building a Java projekt with j2objc in command line, I specify all needed dependencies JARs with the -classpath attribute, e.g.: httpclient-4.4.1.jar or others. This works for all dependencies except classes from namespace javax.* (e.g.…
beseder
  • 1,352
  • 2
  • 15
  • 25
0
votes
1 answer

J2OBJC_HOME not correctly defined in LibConfig.xcconfig

I was trying to run a J2OBJC sample from this "https://github.com/yixiang/Xcode-J2ObjC-Example" repository. I am facing some issue while building this project. the error is listing below. VERSION_INFO_STRING="\"@(#)PROGRAM:SharedCode …
Joseph
  • 99
  • 12
0
votes
1 answer

"J2OBJC_HOME\ not\ correctly\ defined\ in\ Settings.xcconfig

Guys last 2 to 3 day I am trying to run an example project for J2OBJC conversion. First I faced issue for the j2objc command not found, fixed this issue by adding the path to the /etc/paths file. Now I am facing an issue like J2OBJC_HOME path not…
Joseph
  • 99
  • 12
0
votes
1 answer

j2objc - exception when deserialize enum

I am having trouble deserializing objects that contain an enum. The object serializes without complaint, but I get an InvalidObjectException when I deserialize the object. The exception message says that there is "No enum constant…
mkeller
  • 3
  • 1
0
votes
1 answer

Not able to install J2OBJC using terminal

I have download the J2OBJC version and while running the command on terminal A:j2objc-master $ make dist I am getting below error building j2objc jar javac: invalid source release: 1.8 Usage: javac use -help for a list of possible options make[1]:…
Ankur
  • 1
  • 7
0
votes
1 answer

Has the Cocoapod of J2ObjC been depricated?

The J2Objc Cocoapods page lists the latest version as 0.9.6.1 and this is what pod update fetches. However, the J2Objc git page indicates that the latest version is 2.0.2. Has the Cocoapod for J2ObjC been deprecated?
Brian White
  • 8,332
  • 2
  • 43
  • 67
0
votes
3 answers

J2ObjC JavaLangTreeSet not possible?

I'm trying to create a TreeSet in objc using the J2ObjC cocoapod package v0.9.6.1 (the latest at this time). #include id set = [[JavaUtilTreeSet alloc] init]; for (NSString* setval in (NSArray*)values) { …
Brian White
  • 8,332
  • 2
  • 43
  • 67
0
votes
0 answers

Facing issue while converting java code to objective c code using j2objc

I am trying to convert some of the java files to objective c classes. But i am facing some issue here. kindly check the image below. Command i have given: Click here to see the command i have given Error i got: Click here to check the error i…
0
votes
1 answer

How to include apache commons lang3 in XCode with J2ObjC

Trying to get my first j2objc project up and running in XCode. I have a few .java files and one of them references string functions in the apache commons library. I'm getting an error that says: Package org.apache.commons.lang3 does not exist I…
noelicus
  • 14,468
  • 3
  • 92
  • 111
0
votes
2 answers

Catch NSMallocExceptioni using swift

From time to time my users find this error: myapp(7383,0x1a1471000) malloc: * mach_vm_map(size=67125248) failed (error code=3) error: can't allocate region set a breakpoint in malloc_error_break to debug 2017-04-06 20:33:58.152…
Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
0
votes
1 answer

J2OBJC_HOME not correctly defined in Settings.xcconfig

I must to include *.jar files in my Xcode project so I decided to use j2objc to translate them into Objective C. I tried to configure my project with no success so I just downloaded a sample project from here and here. All of them cannot compile…
adamofsky
  • 31
  • 4