How do you handle multiple OS versions ?

The question is which of the two approaches you find better:

  1. Have a different project for Android and iOS

  2. Have one project and handle all the differences through code (e.g. if device.isAndroid then …)

With our first game we used the a) approach but find it cumbersome to maintain the code.

Now we are thinking about using the 2) approach.

Is it possible to handle all (or most) the differences thorough code ?

Would be great if you share your experiences how you handle the multiple OS challenge.

Regards,

Damir.

Hi Damir,

I think approach (2) is far superior.  It’s actually one of the main benefits of Corona: you can have a single code base and deploy to both iOS and Android.  Nearly all my code are independent of the OS, and the small parts that depend on the OS are generally very simple things (e.g., the IDs used for ad networks, Flurry, etc.).  I’ve only rarely faced a situation where my core functionality needed to be different on iOS versus Android.  Are there specific challenges or concerns you have?

Now, I’m only working on games.  Business apps, and in particular making a native-looking UI on both iOS and Android, may be a bigger issue.  (The themes in the widgets library are meant to address that, but I’ve never used them.) 

  • Andrew

Hi Damir,

I think approach (2) is far superior.  It’s actually one of the main benefits of Corona: you can have a single code base and deploy to both iOS and Android.  Nearly all my code are independent of the OS, and the small parts that depend on the OS are generally very simple things (e.g., the IDs used for ad networks, Flurry, etc.).  I’ve only rarely faced a situation where my core functionality needed to be different on iOS versus Android.  Are there specific challenges or concerns you have?

Now, I’m only working on games.  Business apps, and in particular making a native-looking UI on both iOS and Android, may be a bigger issue.  (The themes in the widgets library are meant to address that, but I’ve never used them.) 

  • Andrew