Flashy Substance Blog

Tips and Tricks in Cross Platform Mobile Development

I haven't figured out way to avoid changing config.lua or build.settings
0

Edits You Can’t Avoid When Changing the Store Target in Corona SDK

I like to minimize the number of things I have to change when compiling for different devices, because I’m likely to forget a step or two.  I use the following techniques to minimize changes:

  • Using store.target throughout the app to write conditional code and show different interfaces if necessary 
  • Using the build.settings supportedPlatforms key to only include plugins when appropriate
  • This is only a requirement if you’re worried about the size of your compiled build.  Rather than have to move files in and out of the directories yourself, you can exclude files from builds programatically.

Using this approach, there are only three possible places I can still screw up and when I’m intending to build for a particular platform.

  • In the build dialogue, I still have to select all the right options.  Using the same package name and keystore/alias for all Android builds helps, but there is room for user error here.
  • build.settings permissions.  When I build for Google Play I have a number of permissions that I request to support Google Play iAP as well as Push Notifications.  When I build for Amazon I remove these because I know that users on Amazon will complain about apps that request too many permissions.
  • config.lua – there are two Google Play specific nodes that can cause errors in your Amazon build – the license table, which is used for Google iAP, and the notification table, which is used for push notifications.  You can leave the notification table in, but you MUST comment out the Google node.
building for deviceCorona SDK

Joe • November 25, 2014


Next Post

Leave a Reply

Your email address will not be published / Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>