Deploying to a Device

I have a general question about this. Do people usually encounter some problems when testing a game on the device (iPhone and android mainly) when it works well on the simulator? And if so, what types of problems/errors are they normally? Or does it mean that when it works well on the simulator, it will work well on the device too? Need some guidance and tips before I start to code a bunch of files and ending up with a tedious job going through each of them to find where the error(s) occurred. Thanks!

Usually there are no big problems running on a device if it runs well in the Corona Simulator, however there’s no guarantee that things will work as expected on a device. There are some things that *only* work on a device like multitouch, native widgets, in-app-purchasing and some plugins etc. You might also see some layout differences for fonts and font sizes.

Normally everything works as expected on a device, but there are times when things don’t. As a rule-of-thumb you should *always* test on a device before releasing to any app store. 

My advice is to write your code and test in the Simulator. From time-to-time test on a device (iOS/Android) and fix whatever issues you may see.

There are two big areas beyond what Ingemar said that can burn you.

1.  The filesystems on devices are case sensitive and on Windows or OS-X they are not.  Thus if you do:

   local someImage = display.newImage(“SomeImage.png”)

but the file name is really:   someimage.PNG

You are going to get an error.  This is the most common cause of “It works in the simulator and not on the device”.  I would say 90% of that symptom is related to case sensitivity issues. 

  1. The build.settings file isn’t processed until build time and on the device.  That means that the simulator will never see issues with the build.settings file (with maybe the exception of plugins).  So things in the iphone plist or Android permissions can show up only when on the device. 

Usually there are no big problems running on a device if it runs well in the Corona Simulator, however there’s no guarantee that things will work as expected on a device. There are some things that *only* work on a device like multitouch, native widgets, in-app-purchasing and some plugins etc. You might also see some layout differences for fonts and font sizes.

Normally everything works as expected on a device, but there are times when things don’t. As a rule-of-thumb you should *always* test on a device before releasing to any app store. 

My advice is to write your code and test in the Simulator. From time-to-time test on a device (iOS/Android) and fix whatever issues you may see.

There are two big areas beyond what Ingemar said that can burn you.

1.  The filesystems on devices are case sensitive and on Windows or OS-X they are not.  Thus if you do:

   local someImage = display.newImage(“SomeImage.png”)

but the file name is really:   someimage.PNG

You are going to get an error.  This is the most common cause of “It works in the simulator and not on the device”.  I would say 90% of that symptom is related to case sensitivity issues. 

  1. The build.settings file isn’t processed until build time and on the device.  That means that the simulator will never see issues with the build.settings file (with maybe the exception of plugins).  So things in the iphone plist or Android permissions can show up only when on the device.