ok. here's how to do it for a simple app:
in xcode, choose new project. select "Java AWT Application" (or swing), give it a name and location.
remove About.java and PrefPane.java from the project. (we won't need them)
let your main java file contain:
Code:
// my project was called ProcessingXcodeExample,
// alter the code to match your project name.
import java.awt.*;
import javax.swing.*;
import processing.core.*;
public class ProcessingXcodeExample extends PApplet {
public static void main ( String args[] ) {
// has to match your class name!
PApplet.main( new String[]{"ProcessingXcodeExample"} );
}
public void setup ()
{
size( 100, 100 );
}
public void draw ()
{
rect(random(width/2),random(height/2),10,10);
}
}
make sure your class-name matches the string you pass to PApplet.main(), see above ...
now from the project menu choose: "Edit Active Target '...' "
in the window that opens, in the left menu choose "Search Paths"
on the right side click "Java Classes" and then the little + below to add:
in the file-chooser select the "lib" folder of your current processing version, click OK. then add "/core.jar" to the line, like:
$(SYSTEM_APPS_DIR)/Processing 0123/lib/core.jar
again from the right menu, choose "Pure Java Specific" from the "Info.plist Entries" tree. on the right side click the +. insert:
$JAVAROOT/core.jar
close the window.
( now you should be able to build this already )
to add the core.jar to the app (package) itself do:
right-click (or ctrl-click) on the (only) target, choose "Add > New Build Phase > New Copy Files Build Phase"
in the "General" tab, set "Destination" to "Java Resurces", close window.
from the "Project" menu choose "Add to Project", in the file-chooser select core.jar (/Applications/Processing XXX/lib/core.jar), click OK, click Add.
in the left menu, drag core.jar from the top project-tree into the "Copy Files" block down in your target. (to make it copy the file to inside your apps bundle).
( "Clean All" before if you build earlier )
ready, build and run!
F