J2objc - resolving object types

I installed j2objc and am trying to convert my package to objective-c. My classes reference each other, as well as JSONObject and JSONArray. I get a bunch of the following errors.

class name cannot be resolved for type

How can I make sure these links are allowed?

+5
source share
1 answer

If you don't have j2objc defined as a system variable, here is what I did:

  • Put the j2objc folder inside your java project folder (to simplify the paths in the terminal)
  • If your Java project project names look like com.example.appName.ClassName.java -j2objc should be in the same directory as com
  • In cd terminal for project name containing com
  • Put this on the command line:

    j2objc-0.8.3/j2objc -use-arc -sourcepath com -ignore-missing-import com/example/appName/*

, , , , - -sourcepath. use-arc ignore-missing-import .

+5

All Articles