Get Xcode to build directly with Corona

Ive also put this under “Install Help” but as I think it will help anyone using xcode as the dev environment ive added it here so you all see it!

Hopefully this will make it into the guide and have diagrams, but until then…

  1. Create a new project, “File” > “New Project”

  2. Template for project should be “Other” > “External Build System” and save the project

  3. Under “Targets” in the left hand “Groups & Files” window in the main xcode editing window double click “Your Projects Name Goes Here”

  4. Remove all the “Build Settings”, dont know what they did but removing them didnt hurt

  5. In “Build Tool” enter the path to either the “simulator” link or the “Corona Terminal” app
    just so you know, if you put the Corona folder in your Applications folder the the paths are as follows
    “/Applications/Corona/Corona Terminal” or “/Applications/Corona/simulator”

  6. Under “Arguments” enter “$(PROJECT_DIR)”, this passes the location of the folder, what Corona looks for, to the simulator so it launches and builds the app without asking for the location of the project folder

  7. Right click on the top of the main xcode window, the toolbar, and select “Customize Toolbar” and add the “Build” icon to the bar and click “Done”

  8. Clicking the “Build” icon will now launch your application in Corona

Enjoy! [import]uid: 5354 topic_id: 567 reply_id: 300567[/import]

if I missed a step let me know but I think thats it [import]uid: 5354 topic_id: 567 reply_id: 1108[/import]

Always shows the ‘open folder’ dialog - I can’t get it to run automatically whatever i do. [import]uid: 5897 topic_id: 567 reply_id: 1597[/import]

have you entered $(PROJECT_DIR) in the correct place? thats what passed where the folder is [import]uid: 5354 topic_id: 567 reply_id: 1598[/import]

Yes, its in the ‘Arguments’ field.
Tried everything I can think of, but it always asks for the folder. [import]uid: 5897 topic_id: 567 reply_id: 1599[/import]

This is my blank setup file, see if it works for you

http://files.me.com/mattpringle/hmfuoe [import]uid: 5354 topic_id: 567 reply_id: 1601[/import]

Thanks for taking time to send this Matthew.
You file does work, and appears to be the identical to mine which doesn’t work.

very strange…

I guess I’ll just copy yours and use as a template.

cheers. [import]uid: 5897 topic_id: 567 reply_id: 1609[/import]

No probs, hope I didnt miss a step.

Anyway I will leave the file up (let me know if it expires) so anyone who wants can download it. [import]uid: 5354 topic_id: 567 reply_id: 1610[/import]

Thanks !

Carlos [import]uid: 24 topic_id: 567 reply_id: 1616[/import]

Matthew - Thanks for providing a very worthwhile shortcut. I’m facing a similar situation to Steeley, and have downloaded your config file, with the same result. I am still running Xcode 3.1.4 under OSX 10.5.8, so that may be a cause of the problem for me (I noted that your build config is set for SL 10.6). If there are any other suggestions you might make, I’d really appreciate it, as this is a very natural extension of Xcode use, and I’d like to add it to the features I use regularly.

Kind Regards,

Jeff [import]uid: 5950 topic_id: 567 reply_id: 2096[/import]

Hi Jeff

There is nothing I can think of, ive followed the instructions and it worked for me. Maybe try a newer xcode.

I take it you are pressing the “Build” and not “Build and Run” button and you you have corona in the applications folder

Matt [import]uid: 5354 topic_id: 567 reply_id: 2102[/import]

This is great, thanks Matthew !
Is there away to get the terminal to show debug print statements etc using xCode ?
[import]uid: 2914 topic_id: 567 reply_id: 2188[/import]

What I have noticed is that in the bottom right of the main Xcode window there sometime appears a red dot listing the number of build errors, this is basically the terminal output. Its not something live looked into that much but im planning on it. [import]uid: 5354 topic_id: 567 reply_id: 2189[/import]

Hi has anyone setup this up including syntax highlighting etc in Xcode 4?
Cheers

Chris [import]uid: 9457 topic_id: 567 reply_id: 10419[/import]

Hi Alcamie,
I have a file that you can add to xCode that will give you syntax highlighting.

I have just one issues, the build works fine, the simulator shows up, but the process is displayed are running, so if I stop the process, I have to respawn Corona terminal.

The only problem with that is after a few runs, there is a significant decrease in resources and the systems slows down.

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 567 reply_id: 12334[/import]

I took the text from Matthew Pringle’s text at the forum in the link above and created a PDF that new users can follow to use XCode as the default editor for Corona and use Syntax Highlighting.

The document can be found here
http://iphone.jayantvarma.id.au/files/XCodeAsEditor.pdf

Hope that you find it useful

cheers,

Jayant C Varma
[import]uid: 3826 topic_id: 567 reply_id: 12360[/import]