In our Display
Objects
project, we left off displaying a background image and three similar display objects in the simulator. When running the project on different devices, the coordinates and resolution size were most compatible with the iPhone only. When building applications for multiple devices across iOS and Android platforms, we can configure it using a config.lua
file that is compiled into the project and accessed at runtime. So let's get to it!
In your text editor, create a new file and write out the following lines:
application = { content = { width = 320, height = 480, scale = "letterbox", xAlign = "left", yAlign = "top" }, }
Save your script as
config.lua
in yourDisplay
Objects
project folder.Mac users, launch your application in Corona under the iPhone device. Once you have done so, under the Corona Simulator menu...