How to use XCode with Corona

Posted by JayantV, Posted on November 28, 2010, Last updated October 11, 2011

3 votes

Here's how to use XCode as the default editor for Corona and use Syntax Highlighting. This has been collated with information available on the forums.

UPDATED:
The document can be found here
http://files.oz-apps.com/XCodeAsEditor.pdf

and the http://files.oz-apps.com/Lua.xclangspec file

Hope that you find it useful. If you make changes to any or find some new ways, please update the document, the Corona community will like you for it.

cheers,

Jayant C Varma

Compatibility: 
Corona 2.0

Replies

Spacehunter
User offline. Last seen 40 weeks 6 days ago. Offline
Joined: 20 Oct 2010

Very useful!!!

Thank you very much!

Now, if only I could integrate a build for device button :)

hima
User offline. Last seen 1 year 1 week ago. Offline
Joined: 8 Apr 2010

The code highlight doesn't work for me. I've tried putting it in the said folder and nothing happen. Try restarting the computer and still Xcode wouldn't show any syntax coloring at all. I'm using XCode 3.2.4, by the way. :(

Spacehunter
User offline. Last seen 40 weeks 6 days ago. Offline
Joined: 20 Oct 2010

Hima,

Did you replace the contents of Lua.xclangspec

with of version from the following link?

http://iphone.jayantvarma.id.au/files/Lua.xclangspec

hima
User offline. Last seen 1 year 1 week ago. Offline
Joined: 8 Apr 2010

Spacehunter,
Yes , I did. It seems like Xcode doesn't recognize Lua.xclangspec at all. I've been searching and found that this seems to be a problem with Xcode. I'll try uninstall the whole XCode and clean install it later.

jch_apple's picture
jch_apple
User offline. Last seen 2 days 8 hours ago. Offline
Joined: 4 Apr 2010

Hi,

As a PC user not very familiar with Mac software, I use my iMac only to test and publish. I edit with Notepad++ on my PC (more convenient because other tools like Photoshop are Windows versions). File are located on the Mac and shared using LAN.

So if you want to use Corona and hesitate because you have a powerful PC and don't want to invest in "big" Mac, you can use a Mac mini just to compile. Publishing process is fast, nothing to see with the several minutes required by Flash CS5.

Hope it can help !

JayantV's picture
JayantV
User offline. Last seen 2 hours 23 min ago. Offline
Joined: 31 Oct 2009

jch_apple,
It is a bit funny the way people perceive benefit and value. Yes, everywhere in the world, an Apple Laptop/Desktop is more expensive than it's windows counterpart. However having said that, the extra that you spend on a mac ensures that it is relatively less troublesome in terms of settings and configurations, etc.

My Toshiba i5 with 4GB RAM boots up really slow in comparison to my 15" MBP with 4GB RAM which is about 2 years old.

My rationale while buying the MBP was that I can run the OSX, *nix (which I taught at Uni) and Windows, but I cannot run the Mac OSX on a Windows Box. Plus the Hardware I got with the Mac was state of the art (and came at a price)

I purchased the Toshiba purely to dabble with the Windows Phone and I was disappointed at the performance. That's running Win7 Ultimate 64-bit the Mac is 64-bit Snow Leopard.

I am not an Apple FanBoy as I used to be for a long time in my career a MS Dev starting from pre-windows and MS FoxPro through Vis.FP and VB and VC++, etc to Apple and Objective-C and now a bit of Lua.

I feel that an Apple machine is better and worth the extra money that one would invest. The quality of the hardware itself is worth it.

cheers,

Jayant C Varma

jch_apple's picture
jch_apple
User offline. Last seen 2 days 8 hours ago. Offline
Joined: 4 Apr 2010

Hi Jayant,

I can understand your comment (I've bought an iMac to use Corona and to test some of our works in Mac environment).
My point is not to compare technologies or to argue for Windows vs OS-X. Both have satisfied customers, both are good in some points and perfectible in some others.
I'm just much much familiar with Windows that anyway I have to use and wanted to share the way I work if it can help some users. For people having already a PC with 2 screens and so on, buying a "small" Mac can be enough using it the way I describe. For people considering buying a new equipment, you give some excellent arguments. I can add one that is very important to me, iMac works silently !

Rgds

JC

JayantV's picture
JayantV
User offline. Last seen 2 hours 23 min ago. Offline
Joined: 31 Oct 2009

hi jch_apple,
I guess I was being a bit too environmentally friendly. I used to love having multiple monitors and multiple PC's round 2000. Now, 10 years later and iMac later I guess having one BIG screen and a single machine running virtual machines is a more efficient way to go.

Here in Australia, a Mac Mini is about $999 and the MBA 11" about $1200, so a mac mini is in a way not exactly a good bet, specially if someone is serious about development.

But then again I do remember when I started out, I thought that the Mac was an expensive machine that I had no use for. Playing with Liquid Mac made me think, that is the way to go for Macs and its a new interface. I could also swap workspaces by tapping on one side of the mac using the inbuilt accelerometer. iPod/iPhones really changed everything.

Anyways, my point was not anything against what you had written, I was trying to just imply that if someone had to become a developer it would be better to get a proper mac (an iMac or a MacBook) and work with it, nothing better than being submerged into the environment before you work with it.

cheers,

Jayant C Varma

khanh.dq's picture
khanh.dq
User offline. Last seen 6 weeks 5 days ago. Offline
Joined: 17 Sep 2010

Hello, how about auto-complete for xCode, this feature will speedup our coder's coding speed.

jch_apple's picture
jch_apple
User offline. Last seen 2 days 8 hours ago. Offline
Joined: 4 Apr 2010

@jayantv, I do agree, people thinking to buy a new computer should consider Apple, and you're right, I would prefer a BIG screen rather than 2 (even high res ones).

Here in France Mac mini is 699 euros for the 320 gb and 999 for the dual 500 gb (we are far away from Xcode and Lua, don't we :o{

Anyway, the important thing is to have Corona continuing to help us to develop, whatever we use to do that, and sharing opinion is always interesting.

tootable's picture
tootable
User offline. Last seen 15 hours 25 min ago. Offline
Joined: 8 Nov 2009

Jayant,

Just curious. What program did you use to take the screenshots with the circle highlights?

JayantV's picture
JayantV
User offline. Last seen 2 hours 23 min ago. Offline
Joined: 31 Oct 2009

Hi Japanangka,
The screenshots were all taken with any screenshot taking tool, the circle highlights were created using a technique called masking.

The screenshot was overlaid with a darker solid image and a mask cut through to allow the image to show.

The other image was a layer pasted into a circular selection thereby causing a mask.

hope that helped.

cheers,

Jayant C Varma

tootable's picture
tootable
User offline. Last seen 15 hours 25 min ago. Offline
Joined: 8 Nov 2009

Jayant.

No worries. I thought you might have been using a particular screenshot taking tool that made the circles rather than doing them by hand.

Liam

loganmoseley
User offline. Last seen 1 year 13 weeks ago. Offline
Joined: 14 Feb 2011

I didn't do the custom build settings, but the syntax highlighting and auto-complete are working great so far. Thanks for the tutorial and thanks to the Xcode config file authors!

3saul
User offline. Last seen 44 weeks 1 day ago. Offline
Joined: 31 Jan 2011

This doesn't appear to work in XCode 4. Can anybody provide some advice?

JayantV's picture
JayantV
User offline. Last seen 2 hours 23 min ago. Offline
Joined: 31 Oct 2009

I hope this thread is wrong.

http://discussions.info.apple.com/thread.jspa?messageID=13200970

It seems that for the moment xcode4 is only supporting what Apple provide, even the IB plug-ins and custom controls do not work.

For everything else, there is xcode 3.2 which you can install in parallel.

If you have upgraded to xcode4, install xcode3.2 in a different directory as Developer and you will find that xcode 3.2 works but xcode 4 is broken (keeps crashing on startup, due to some plug-in issue) then reinstall xcode4 and both shall work in parallel.

XCode was always trouble, I could see it in the developer previews.

cheers,

mraak
User offline. Last seen 21 weeks 17 hours ago. Offline
Joined: 19 Jan 2011

Yep, I have problems running it on XCode4 too. Will keep an eye on this thread.

chris.slee5's picture
chris.slee5
User offline. Last seen 33 weeks 6 days ago. Offline
Joined: 11 Feb 2011

Anyone get xcode 4 working yet? Just checking...

coderebelbase's picture
coderebelbase
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 1 Feb 2010

Xcode4 check.... yay?

Clement
User offline. Last seen 16 min 32 sec ago. Offline
Joined: 29 Nov 2010

Can someone reupload the pdf? The link is down.

kayrules
User offline. Last seen 46 weeks 15 hours ago. Offline
Joined: 2 Jul 2011

hi @jayantv, the link is down. where else can i download this pdf?

JayantV's picture
JayantV
User offline. Last seen 2 hours 23 min ago. Offline
Joined: 31 Oct 2009

@kayrules,
that domain has expired and so did the data associated, I will look up my old hdd and get that file, just gimme some time.

cheers,

?:)

hubdave
User offline. Last seen 19 hours 44 min ago. Offline
Joined: 3 Aug 2011
hubdave
User offline. Last seen 19 hours 44 min ago. Offline
Joined: 3 Aug 2011

Jayantv, can you please reupload that pdf somewhere? I'm desperate to read what's inside and there are no other links anywhere - I've checked! You could just upload it to rapidshare, filesonic or depositfiles, and we can download it for free from there.

I'd be very grateful, let us know..

JayantV's picture
JayantV
User offline. Last seen 2 hours 23 min ago. Offline
Joined: 31 Oct 2009

Hi Hubdave,
I do not need to put it on rapidshare or such, I will pu tit on my site, the problem is that I had that and several other files on a domain name and space that expired and I did not want to renew, failing to realise that I had stuff on there.

I will locate that asap and put it up.

cheers,

?:)

leander80
User offline. Last seen 35 weeks 9 hours ago. Offline
Joined: 2 Jul 2011

Hi folks, I am a totally confused Windows user looking for help =(

Can anyone tell me how to uninstall XCode?

I am running Lion and installed XCode 3.2.6 -now I've been told that I need to install a newer version of XCode (I am not able to build since Corona gives me an error message when trying to build anything).

According to some instructions found on the web, I would need to run an uninstall script to get rid of my old XCode version:

sudo /Developer/Library/uninstall-devtools --mode=all

First, I can't find such a script in my Developer/Library folder and second, when entering the comman above into the console, I am asked for a password. However, I did not apply any password to my Lion account yet. So what password???

Is there any other way to get rid of XCode?

Thanks for helping.

ojnab's picture
ojnab
User offline. Last seen 3 weeks 4 days ago. Offline
Joined: 5 Jan 2011

Hi Jayant
Any chance you would put your corona syntax coloring file back online? Your link broke... I would be very grateful if you did. Thanks ojnab

ojnab's picture
ojnab
User offline. Last seen 3 weeks 4 days ago. Offline
Joined: 5 Jan 2011

Cool...
Thanks a lot

sdansereau
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 15 Feb 2012

I am using Xcode4 and there is no ~/Library/Application Support/Developer/ folder. Even if I create it and copy the files, Xcode won't recognize the Lua syntax.