12 February 2016
From the Forum — Issue #110
Welcome to the latest installment of From the Forum. In this series, guest blogger Alex Jackson highlights outstanding threads from the Corona Forum. The goal is to bring attention to the most captivating, interesting, and thought-provoking discussions taking place in our very own backyard.
Please visit the forum to join these conversations or start your own!
Promo code solutions
This first forum tip is short and sweet. Working with promo codes can at times be confusing and arcane, but one Corona developer has found a solution for acting on promo codes using dreamlo backend server action.
The best part is that, the entirety of the code is in the forum post below, and it also builds on a technique documented by a well-traveled Corona developer. All this adds up to confidence in the functionality working as advertised. Check it out and let us know how you get on!
Testing 3 dimensions, when all you’ve got are 2…
Getting spun up on all new device architecture can be a tough gambit. In so many instances, we have the ability to get our apps out on new devices so quickly due to the speed at which Corona SDK allows us to develop. I’ve been guilty of jumping the gun a bit, and releasing updates that leverage new device features that I haven’t fully tested yet.
And why haven’t I tested them, you ask? Well, as much as I would like to be, I can’t afford to be on the bleeding edge and obtain every new device as soon as it comes out. Fortunately, Corona, and the community, has you covered. In this example, Corona SDK ships with sample apps that show how 3D Touch can be implemented and detected.
In addition, the Corona developer community is very giving. In the future, if you know a new device has a cool feature that you wanted to kick the tires on, but for whatever reason, don’t have access to the device, you’d do well to ask for some assistance in the forums. You’ll be surprised by the response!
How to leave, gracefully
We’re highlighting a quick PSA from Corona engineers in the below post. I have been guilty of quickly inputting the
os.exit() API as a short-hand to killing my app back to the device home screen. However, it’s actually best to quit your app or game by using the
os.exit() is apparently a bugaboo with some Apple app reviewers, and can be misconstrued as an unhandled crash. Pretty much a no-no no matter how you slice it. Take a look at the thread below to see some other caveats on this topic as well.
Alex Jackson is an indie developer and the founder of Panc Interactive, specializing in retro-style gaming. He has created several mobile applications, enjoys long walks on the beach, pixel art, and reading the Corona forums. Contact him by email or follow him on Twitter: @pancinteractive. Check out his new game Segreta on iOS, Android, Windows Phone and Amazon devices.