Hide / show code on sim or device

I don't know if this is possible but can you wrap certain code with keywords so that certain logic gets called in the simulator and other on devices

Specifically Im thinking of Corona Remote code which obviously when on a device doesn't work and I then need to revert back to the vent handler for accelerometer. Of course the technique isn't just limited to this scenario though

Any thoughts or direction please

You can use this API http://developer.anscamobile.com/reference/index/systemgetinfo - if it's running on a simulator it will tell you so. (So you could set a flag in your functions of the like.)

Peach :)

views:1577 update:2011/12/31 9:35:10
corona forums © 2003-2011