This chapter will help you get started using the Corona SDK.
We’ll cover the basics like installation, recommendations for setting up text editors, and discuss how to launch the simulator and the debugger.
If you haven't already, we recommend you follow along Corona in 5 minutes to get the quickest introduction to Corona SDK.
Installation of the Corona SDK is very simple. We'll assume you've already downloaded the SDK. If you're already familiar with how apps are installed from disk images (dmg), then just proceed as normal; you can skip the following instructions:
CoronaSDK.dmg. Once it is loaded, you should see the mounted disk image folder, as shown below.
Corona folder into the Applications folder alias. This will copy the contents of the Corona folder into /Applications. If you are not an administrator, you will be prompted for an administrator password. A folder similar to the one shown below hould be located at /Applications/Corona after successful installation. We’ll refer to this folder as the SDK folder.

In order to use the Corona SDK, you must perform a quick and easy one-time authorization process. In order to complete the authorization process, you must be connected to the Internet.
Double click Corona Simulator in the SDK folder. The first time you launch, you will be presented with a End-user License Agreement (EULA). Assuming, you click Agree, you will then be presented with the dialog pictured at right. If you've already purchased (or signed up for a trial), simply enter your Corona Connect e-mail and password to activate the SDK. Otherwise, click Register to create an account.
Upon successful login, you will get a confirmation dialog like the one shown below. You're ready to get started.
By default when you launch the Corona Simulator application, the Corona Welcome window appears, as shown below. From the Welcome window you can open a Corona project for previewing in the Simulator, create a device build for testing or distribution, and access sample projects and documentation.
In Corona, a project is simply a folder that contains a main.lua file and related assets. For example, the image below shows the project folder for the Fishies sample project located in the SampleCode folder of the Corona SDK ( /Applications/CoronaSDK/SampleCode/Graphics/Fishies) . Inside the Fishies folder you will find a file named main.lua, as well as asset files for images and sounds used by the application.
To run the Fishies project in the Corona Simulator, click Open a Project in the Corona Simulator in the Corona Welcome window. In the Open dialog that appears, navigate to the SampleCode/Graphics/Fishes folder and click Open. The Fishies application opens and runs in the Simulator. (Try clicking on some fish in the Simulator window to see what happens.)
The CoronaSDK folder also contains Corona Terminal. Running Corona Terminal does the same thing as Corona Simulator, but also opens a Terminal window that displays useful error messages including syntax errors, runtime errors, and print() statements generated by your application. For these reasons, it's recommended you use Corona Terminal for your day-to-day development.
If you prefer to use the command-line, you can also run ./simulator from the CoronaSDK folder, which is equivalent to double-clicking Corona Terminal.
There are many editors available with which to write your code, such as the Xcode development software from Apple, BBEdit, textedit etc. For the purpose of this document, will give a basic run through with Xcode and BBEdit. The output of these programs will ultimately be a text file named “ main.lua ”.
Once Xcode is installed, all of the necessary Xcode software can be found in /Developer/ on the root of your hard drive.
For the proper syntax highlighting in Xcode, we recommend the following download:
http://www.capgo.com/Resources/SoftwareDev/LuaXcode3SyntaxColor.zip
Follow the instructions included with the download. While syntax highlighting is not necessary, it makes it much easier to navigate your code.
In Xcode, the quickest way to start writing code is to create an empty file. To do this, access the File menu and click on “New File...” On the left hand side, click on “Other” and select “Empty File”:
===>
Once you click the next button, you will be prompted for a location and name for your file. In the File Name field, type main.lua . For Location, you’ll need to create a folder to represent your project. The main.lua should be inside this folder. For example: “Project Name/main.lua ”.
Once you hit “Finish”, you’ll be given an empty window in which to begin your project. If you have installed the syntax highlighting, things like “local” will be colored. This will help you navigate through your project.
Remember to save your file before opening it in the Corona Simulator.
For more advanced configuration options for XCode, please refer to the Documentation included with Xcode or on Apple’s web site.
If this is your first time using BBEdit, you should see something similar to the window pictured below left. Hit continue when you have configured BBEdit to your liking. You should now see an empty window. In the lower left hand corner of the window (bottom right) you can choose "Lua" choose the appropriate language for proper syntax highlighting.



Select “Lua” from the list. Now, as you write your program, it will attempt to automatically format for you. Once you have saved your project, you can now run it using the Corona Simulator.
For more advanced options with BBEdit, please refer to the BBEdit user manual.
On MacOS, there are a variety of text editors available for editing Lua code that have syntax coloring support:
A comprehensive list is available at lua-users.org/wiki/LuaEditorSupport.