Questions tagged [j2objc-gradle]
13 questions
3
votes
0 answers
symbol(s) not found for architecture x86_64 in swift project
I convert java to objective-c,and import it into a swift project by bridging-header file.
When i build the swift project, get the following error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_DTPeople", referenced from:
type metadata…

Leo
- 835
- 1
- 12
- 31
3
votes
1 answer
How to compile java code with swift in XCode
I use J2Objc by Xcode build rules in Xcode(swift).
Write a java file(People.java)
2.make settings for build rules, and add the custom script as the following:
"${J2OBJC_HOME}/j2objc" -d ${DERIVED_FILES_DIR} -sourcepath …

Leo
- 835
- 1
- 12
- 31
2
votes
2 answers
Compile Apache common math for iOS or alternatives
I am trying to compile Apache math for iOS.
I am using this fork : https://github.com/j2objc-contrib/j2objc-common-libs-e2e-test
This library is using J2Objc version : 0.9.8 and J2Objc-Graddle plugin is also old and it was throwing an error…

Iducool
- 3,543
- 2
- 24
- 45
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
2 answers
Possible to have two Java shared code modules in a project?
I have the suggested SharedCode, Android and iOS project structure using the Gradle J2ObjC plugin... where the classes etc in SharedCode are accessed by the main application code of the Android and iOS modules. This works fine.
What I'd like to do…

Adil Hussain
- 30,049
- 21
- 112
- 147
1
vote
1 answer
Exclude tests using J2ObjC Gradle Plugin
Is it somehow possible to exclude test classes from java-to-ObjcC conversion with j2objc-gradle plugin?

nKognito
- 6,297
- 17
- 77
- 138
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…

Sandeep Maganti
- 1
- 3
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
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
1 answer
J2Ojbc native compile- guava headers missing
We are porting an iOS application to Android and are exploring J2objc and protobuf. So far we are working through the issues (we're new to Android and a number of them are due to learning curve).
This particular issue seems like a bug on the latest…

Gjchoza
- 187
- 1
- 7
0
votes
1 answer
j2obj translate of javanano protobuf fails to compile
I'm relatively new to Android and j2objc, hoping this issue has a simple fix.
I created a simple project to test protobuf nano in Android and translate to objective c. The app runs fine in Java sending messages to a C# web service but the…

Gjchoza
- 187
- 1
- 7
0
votes
1 answer
How to add *junit* to *spec.libraries* in generated podspec?
I am using the Gradle J2ObjC plugin to translate Java code in the pure-Java modules of my project to Objective-C. I have a need for the generated podspec file in the build/j2objcOutputs folder of one of my Java modules to contain a junit entry in…

Adil Hussain
- 30,049
- 21
- 112
- 147