Over a million developers have joined DZone.

How to Develop an App Using the Corona Framework

DZone's Guide to

How to Develop an App Using the Corona Framework

This quick tutorial will show you how to make a basic mobile application with the Corona cross-platform mobile development kit.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Corona SDK is a software development kit that lets developers create graphic cross-platform apps (for iOS and Android) using Lua on top of C++/OpenGL. Corona makes it very easy to roll out cross-platform games and graphic-intensive apps. It even includes a physics engine.

Here's a tutorial on how to develop a simple application using the Corona Framework. This is just the beginning. The SDK provides many advanced features as well using which you can create amazing and addictive apps and games.


Download and install the Corona SDK.

There are many IDE’s for working with the Corona SDK. Some good ones are

  • Corona Project Manager (CPM).
  • LuaGlider.
  • Corona Complete.

Install one of these IDEs.

Creating a Simple App With LuaGlider 

Step 1

Launch the LuaGlider Window. Tap on the New Project icon (top left corner) and the window will look like this:

cross platform development using corona framework

Click Next. Give the Project Name, Project Location, and Project Folder. Click Finish and the window will look like this:

how to develop simple application using corona framework

Step 2

Once you complete Step 1, the project window should look like this:

cross platform development- corona framework

Corona applications may be configured through two optional Lua files, which should be saved to the project folder along with the main.lua file:

  • config.lua: handles global content scaling and alignment for multiple screens.
  • build.settings: handles build options like the screen resolutions and the setting of Info.plist values for iOS and/or application permissions for Android.

Now, select main.lua and write these lines:

local textObject = display.newText("Hello Corona !!", 0, 0, native.systemFont, 40)  --
textObject.x = display.contentWidth / 2
textObject.y = display.contentWidth / 4

best mobile application developers corona framework

Conventions used in the above code:

  • local is used for creating local objects.

  • display.newText is for inserting text along with font name and font size.

  • textObject.x is the distance from the left side.

  • textObject.y is the distance from the top.

Step 3

Build and run: tap on the Run icon (top left corner).


cross platform development using corona framework

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

mobile ,mobile app development ,corona ,lua

Published at DZone with permission of Yogesh Jain. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}