From The Blog: Featured tool: Corona Plugin for Xcode

@nick sherman

Have you tried ZeroBrane Studio? It has a debugger, file list, and function navigation window. The only caveat with the function nav window is it will need to be a floating popout, but you can drag it over to the right side. It supports “:” and “.” notation and even anonymous functions. It supports remote debugging (debugging on the device with output and such sent to the console via wifi, even lets you set breakpoints), but I have found that this doesn’t work with Corona Live Server. It also lets you customize the look via a config file.

Here’s a screenshot of my setup:

3HDsuXh.png

I had noticed that the Corona docs wasn’t working. I hit the key, I see the behaviour ‘icon’ pop up, but Safari doesn’t open to the context help.

I can launch the browser and go look up what I want, but it would be good to get it to work.

I am running the latest release of the Xcode plugin.
Thoughts?

Thanks Graham

Yes I see the problem…

Something broke in the documentation lookup script with the latest version of Xcode or MacOS. I updated both today and I am not sure which one to blame. I fixed the problem and it will be available in the next version of the plugin.

I will send you a fix by email later on…

@Vince,

> The only caveat with the function nav window is it will need to be a floating popout, but you can drag it over to the right side.

Thank you for sharing your setup. One quick clarification: the nav window is not limited to be a floating popout; if you move it to the right boundary of the IDE window, a blue shade should appear, which shows when the window will be docks when you release the mouse. You can play with the docking location as you can make it snap in different configurations (next to the main panel or along the entire right border and so on).

Also, Cmd/Ctrl-B opens fuzzy search for symbols across all files in a project, which provides a convenient way to find a function and jump to its location.

Paul.

Here is a video demonstration of the Corona Debugger that will be part of the next release of the Corona Plugin for Xcode.

 

The debugger is being beta tested right now and will be released pretty soon!

Follow this thread to get notified about the update.

 

[media]https://www.youtube.com/watch?v=ct_PF_ijYko[/media]

How do I import an existing Corona project to Xcode? I tried the behaviour script “Import Corona Project” but it has no response.

I am using Xcode version 8.3.3

I believe a file browser/picker is supposed to popup but apparently not happening.  Kindly advise.

Finally managed to resolve the issue by adding a daily build to the Application folder.  My default Corona SDK has no -xxxx append to the file.  Seems like that cannot be recognised.

The auto completion is pretty bad compared to what I am getting from LuaGlider.  Somehow it is unable to recognise the tables that I defined within my codes.  Also after typing “.” after the class/library name, the entire list of Corona functions are displayed instead those specifically just for that class name.

E.g composer. will give the entire list of functions/constants that Corona has instead of just those specifically to composer.  :(

@Falcon777

There are a couple of simple prerequisites. Please read the guide before using the plugin. It is very short and explains everything: http://www.shakebrowser.net/corona-for-xcode/guide.html

The auto completion works like the one in Corona Editor not the one in Lua Glider. Auto completion for user defined tables are not supported.

Thanks for reporting. I see… this is a bug that needs to be fixed.

For now you can type either composer (without the dot) to get the full list of composer functions or or composer dot some letter(s) to get the composer function suggestions matching what you typed.

Regarding this issue:

This appears to be some bug introduced in late Xcode 8 versions. I tested with the Xcode 9 beta and Apple seems to have fixed it. So please wait for Xcode 9 or install the beta version.

The Corona Plugin for Xcode has been updated to v.1.5

 

The update contains: 

 

  1. A Corona Debugger.

  2. The Daily Build picker was updated to work with Corona-xxxx folders.

  3. Various minor improvements and fixes.

 

Get it here: https://marketplace.coronalabs.com/asset/corona-plugin-for-xcode

 

Please notice : this plugin will not update automatically like other plugins in the marketplace. You will have to manually download the update and install it over the previous version. To get notified about updates please follow this thread.

The Corona Plugin for Xcode has been updated to v.1.6   The update contains:    1. API completion/highlighting updated to Corona 2017.3154. 2. Migrated iOS templates to use Images.xcassets icon format. 3. Updated for Xcode 9. Get it here: https://marketplace.coronalabs.com/asset/corona-plugin-for-xcode   Please notice: this plugin will not update automatically like other plugins in the marketplace. You will have to manually download the update and install it over the previous version. To get notified about updates please follow this thread.

I noticed an issue around block comments. 

Per lua.org

A comment starts anywhere with a double hyphen (–) and runs until the end of the line. Lua also offers block comments, which start with --[[and run until the corresponding]].

The Xcode editor only seems to recognize the closure if there is a – in front of it (–]]) While I do it that way, a lot of people don’t, so while it runs fine, it all loses its colouring.

The screen shots attached show the same code, one in Sublime, one in Xcode.

Thought I’d mention it.

Thanks Graham

You are right. I will change it in the next plugin update.

I always use --]] though… because then it is very easy to toggle the comment on/off by adding/removing an extra double hyphen at the beginning of the block comment.

On the above, I use it too, but others don’t and its makes the code hard to read :slight_smile:

On this latest version I seem to come up with the same issue repeatedly. I import a new project, usually some code I find online I want to test, and I load it up, add the files and run it. All is good.

I then come back to it later, load up the project, and none of the files are there any more. It’s happened on multiple projects now.

Is it me?

I have just updated to High Sierra, and updated Xcode to Version 9.0 (9A235)

I did uninstall and reinstall the plug in (latest from marketplace)

Hi Graham

I am able to recreate the problem.

Something was changed in the way files are imported to a project in Xcode 9.

For some reason the files are added outside of the project now. I will fix it in the next update.

For now: after importing everything - if you simply drag the imported folder (or files) onto the project icon (in the file view) the files will be added to the project and will be there the next time you open it. 

Thanks, Jacob

Purchased, download and am trying to install this, but when I open the .dmg, nothing happens… I don’t get the installation screen…  

Nevermind – for some reason it was mounting the DMG but not opening anything.  I’m able to go to the mount and run the installer. :slight_smile:

This sounds/looks great will defiantly check it out in the near future.

I have to say, great job on the video, based upon that alone I Purchased this plugin and I look forward to using it!