Detect if the app is running in CoronaCards or "regular" Corona

Hello,

We are developing a game that will be executed on Corona Cards, with a bunch of interactions with the native app (thanks to the Events).

However, it’s really easier to develop without Corona Cards, with the Corona live builds.

Is there a way to detect if the game is running on Corona Cards or not, in order to “mock” some events that would come from the native app, during our development?

Thanks.

This is kind of a hackish way, but if you use two different build numbers of Corona. Say CoronaCards 2018.3221 and the Corona Simulator 2018.3222 you could then use system.getInfo(“build”) https://docs.coronalabs.com/api/library/system/getInfo.html#build to get the version of Corona you’re running and branch your code based on that.

Rob 

That’ll do the trick, thank you.

This is kind of a hackish way, but if you use two different build numbers of Corona. Say CoronaCards 2018.3221 and the Corona Simulator 2018.3222 you could then use system.getInfo(“build”) https://docs.coronalabs.com/api/library/system/getInfo.html#build to get the version of Corona you’re running and branch your code based on that.

Rob 

That’ll do the trick, thank you.